Re: [GENERAL] Slow lookups on dates? Or something else?
От | Aaron J. Seigo |
---|---|
Тема | Re: [GENERAL] Slow lookups on dates? Or something else? |
Дата | |
Msg-id | 99102513345202.00882@stilborne обсуждение исходный текст |
Ответ на | Slow lookups on dates? Or something else? (Stephen Walton <swalton@galileo.csun.edu>) |
Ответы |
Re: [GENERAL] Slow lookups on dates? Or something else?
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: