Re: On Scalability

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: On Scalability
Date: 2010-10-07 13:52:49
Message-ID: 27853.1286459569@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> On 07.10.2010 10:41, Simon Riggs wrote:
>> Constraint exclusion is linear with respect to number of partitions.
>> Why do you say exponential?

> For some reason I thought the planner needs to check the constraints of
> the partitions against each other, but you're right, clearly that's not
> the case. Linear it is.

Well, it's really more like O(mn) where m is the number of partitions
and n is the number of clauses in the query --- and not only that, but
the O() notation is hiding a depressingly high constant factor. And
then there are practical problems like failing to exclude partitions as
soon as there are any parameters in the query.

There's basically no way that we're going to get decent performance for
large numbers of partitions as long as we have to resort to
theorem-proving to lead us to the correct partition.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vincenzo Romano 2010-10-07 13:57:04 Re: On Scalability
Previous Message Magnus Hagander 2010-10-07 13:44:19 Re: Git cvsserver serious issue

Browse pgsql-performance by date

  From Date Subject
Next Message Vincenzo Romano 2010-10-07 13:57:04 Re: On Scalability
Previous Message Robert Haas 2010-10-07 13:30:56 Re: On Scalability