Re: Query Optimization

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query Optimization
Дата
Msg-id 15817.1243453985@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query Optimization  (Zach Calvert <zachcalvert@hemerasoftware.com>)
Ответы Re: Query Optimization  (Zach Calvert <zachcalvert@hemerasoftware.com>)
Список pgsql-novice
Zach Calvert <zachcalvert@hemerasoftware.com> writes:
> I've added the leaderboardid, score index and it still does the
> sequential scan.  I'm going to try inserting a few hundred thousand
> rows and seeing if it switches to index scan.

You didn't answer the critical question, which is what fraction of the
table rows this query selects.  If it's a large fraction then the
planner never will switch to indexscan, no matter what the table size
--- and it'll be doing the right thing.  Indexscans aren't magic.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Robert Schnabel
Дата:
Сообщение: table check constraint
Следующее
От: Zach Calvert
Дата:
Сообщение: Re: Query Optimization