Re: Query optimization using order by and limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg Smith <greg@xxxxxxxxxxxxxxx> writes:
> That weird casting can't be helping.  I'm not sure if it's your problem 
> here, but the constraint exclusion code is pretty picky about matching 
> the thing you're looking for against the CHECK constraint, and this is a 
> messy one.  The bigint conversion in the middle there isn't doing 
> anything useful for you anyway; you really should simplify this to just 
> look like this:
> firstloadtime >= 129604464000000000::numeric

I have a more aggressive suggestion: change all the numeric(20,0) fields
to bigint.  Unless the OP actually needs values wider than 64 bits,
the choice to use numeric is a significant performance penalty for
nothing.

			regards, tom lane

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux