Re: index problems (again)
| От | Geoff Winkless |
|---|---|
| Тема | Re: index problems (again) |
| Дата | |
| Msg-id | CAEzk6fd6=nEzabNOL+ANH=pp+=9TERZ_yUi7ijb8N_4-esTrOA@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: index problems (again) (Geoff Winkless <pgsqladmin@geoff.dj>) |
| Список | pgsql-general |
On 7 March 2016 at 14:27, I wrote: > So it seems that it should in fact be usable after all. So I'm still > stumped as to why the (scdate,sc_id) index isn't used :( Also, while the index on sc_id will be sorted there's no guarantee that sc_id values will be in order in the table itself, so you're still left with (30,000) potentially random accesses to the table, even assuming fully random distribution of scdate (with a worst-case of 970000 random accesses). That average case is no better than the (30,000) random accesses that were required from using an scdate index, even ignoring the scdate/sc_id index. So I'm afraid I'm fully back in the "I still don't get it" column. Geoff
В списке pgsql-general по дате отправления: