Re: Determining which index to create
От | Martijn van Oosterhout |
---|---|
Тема | Re: Determining which index to create |
Дата | |
Msg-id | 20011122010458.B537@svana.org обсуждение исходный текст |
Ответ на | Re: Determining which index to create (Eric Cholet <cholet@logilune.com>) |
Ответы |
Re: Determining which index to create
|
Список | pgsql-general |
On Wed, Nov 21, 2001 at 12:53:09PM +0100, Eric Cholet wrote: > I should have mentionned I tried that, but it isn't being used: > > => \d dico_frs_motid_date > Index "dico_frs_motid_date" > Attribute | Type > -----------+-------------------------- > motid | integer > date | timestamp with time zone > btree > > => explain select * from dico_frs where motid=4742 order by date desc limit > 10; > NOTICE: QUERY PLAN: > > Limit (cost=0.00..17591.91 rows=10 width=16) > -> Index Scan Backward using dico_frs_date on dico_frs > (cost=0.00..20023641.63 rows=11382 width=16) Well, it is doing the scan backwards, which is good. But it's not using the index. If you drop dico_frs_date index, does it do it then? Oh, and what version of postgres was this again? -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Magnetism, electricity and motion are like a three-for-two special offer: > if you have two of them, the third one comes free.
В списке pgsql-general по дате отправления: