On 07/05/2009 12:59, Jasen Betts wrote: > where lastlogin::date between '2009-05-01'::date and '2009-05-02'::date > > If you leave it uncast postgres will probably convert the lastlogin to > a string and produce results other than that desired and proabaly > take longer to do it too. The OP was basing the query on a timestamp column, so I'd say Postgres was casting everything to timestamp, with the results he reported. Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@xxxxxx Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general