On Fri, Oct 8, 2010 at 3:20 AM, Vincenzo Romano <vincenzo.rom...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers