| От | Alvaro Herrera |
|---|---|
| Тема | Re: index compatible date_trunc in postgres? |
| Дата | |
| Msg-id | 20081219130628.GD4278@alvh.no-ip.org обсуждение |
| Ответ на | Re: index compatible date_trunc in postgres? ("Scott Marlowe" <scott.marlowe@gmail.com>) |
| Список | pgsql-sql |
Scott Marlowe escribió: > On Thu, Dec 18, 2008 at 10:46 PM, Bryce Nesbitt <bryce2@obviously.com> wrote: > > I've got a legacy app that does 8.3 incompatible date searches like so: > > explain select count(*) from contexts where publication_date like '2006%'; > > explain select count(*) from contexts where publication_date like > > '2006-09%'; > You can create an index on date_trunc (on timestamp without timezone, > but not on timestamp with timezone since it's not immutable) But you can create an index on the timestamptz AT TIME ZONE 'GMT', I think. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера