Search Postgresql Archives

Re: Data comparison SQL in PG 8.2.9

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

 



2009/1/12 Thomas Markus <t.markus@xxxxxxxxxxxxx>:
> be sure to use correct data types. I suppose psql uses timestamps so
>
> select id from users where modify_date = '2009-01-08' limit 1;
>
> is converted to
>
> select id from users where modify_date = '2009-01-08 00:00:00'::timestamp
> limit 1;
>
>
> try
>
> select id from users where modify_date::date = '2009-01-08'::date limit 1;




Thanks. But it used to work without this, and more importantly, this
doesn't explain why the ">" queries are so exceedingly slow now! Any
thoughts?

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux