Re: On Scalability

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: On Scalability
Дата
Msg-id AANLkTimvi1ou4mSbNzz5j10Er7vO7gscNUq9aMetSqzL@mail.gmail.com
обсуждение исходный текст
Ответ на Re: On Scalability  (Vincenzo Romano <vincenzo.romano@notorand.it>)
Список pgsql-hackers
On Fri, Oct 8, 2010 at 3:20 AM, Vincenzo Romano
<vincenzo.romano@notorand.it> wrote:
> Do the same conclusions apply to partial indexes?
> I mean, if I have a large number (n>=100 or n>=1000) of partial indexes
> on a single very large table (m>=10**12), how good is the planner to choose the
> right indexes to plan a query?
> Has also this algorithm superlinear complexity?

No, it's also linear. It needs to look at every partial index and
check to see whether it's a candidate for your query. Actually that's
true for regular indexes as well but it has the extra step of proving
that the partial index includes all the rows your query needs which is
not a cheap step.

The size of the table isn't relevant though, except inasmuch as the
savings when actually running the query will be larger for larger
tables so it may be worth spending more time planning queries on large
tables.

-- 
greg


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

Предыдущее
От: Gabriele Bartolini
Дата:
Сообщение: Italian PGDay 2010, Call for papers
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Sync Replication with transaction-controlled durability