hi...
> Many of the lookups I have to do on this database are on the date, in
> particular on date_trunc('day',date). Such lookups seem much slower
> (5-10x) than they were on mSQL against the yyyymmdd field, with both
> servers on the same hardware. Is this inherent in the format, or is
> PostgreSQL that much slower? If the format is the problem, is there some
> way of adding a field to my table which would be automatically set equal
> to date_trunc('day',date) whenever the date field was set or updated? Or
> should I look elsewhere for performance improvements?
my experience has been that this:
select date_time_field::date from table_name;
is much faster than:
select date_trunc('day',date) from table_name;
perhaps it's just me @;-)
--
Aaron J. Seigo
Sys Admin