| От | Stephan Szabo |
|---|---|
| Тема | Re: pg 7.4.rc1, Range query performance |
| Дата | |
| Msg-id | 20031110165327.P34950@megazone.bigpanda.com обсуждение |
| Ответ на | Re: pg 7.4.rc1, Range query performance (ow <oneway_111@yahoo.com>) |
| Список | pgsql-sql |
On Mon, 10 Nov 2003, ow wrote: > --- Stephan Szabo <sszabo@megazone.bigpanda.com> wrote: > > I'm not sure that AK_abc is the best index for check a range on a and > > single values on b and c. I'd think that something like an index > > on (b,c,a) would probably be better for this purpose (without doing any > > testing ;) ). > > That would not work for us since most of the time users are working with most > recent data, hence column "a" is the first in the index. Are you doing alot of queries where you're only searching on a? If so, then you may want to consider a second, non-unique index to speed up this sort of query. With a range query on a and fixed values on b and c, you're really not utilizing an index in that order efficiently.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера