pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Simon Riggs <simon@2ndQuadrant.com>
Cc: Vincenzo Romano <vincenzo.romano@notorand.it>
Cc: pgsql-hackers@postgresql.org
Subject: Re: On Scalability
Date: Thu, 07 Oct 2010 09:52:49 -0400
Message-ID: <27853.1286459569@sss.pgh.pa.us> (raw )
In-Reply-To: <4CAD7BED.4050009@enterprisedb.com >
References: <AANLkTi=6=WRpND-MXv92D-+iC9AnYDwLsbbXMXj4uNky@mail.gmail.com >
<1280423526.8613.36.camel@jd-desktop.unknown.charter.com >
<AANLkTikV96eAFxEuqk4k6jadtDomLhnJrwqtEh3mNKs6@mail.gmail.com >
<1280425184.8613.41.camel@jd-desktop.unknown.charter.com >
<AANLkTim7HQQz=qGfW=xDhx-8HNppYxXF48NjnU2-XiNt@mail.gmail.com >
<1280427410.8613.44.camel@jd-desktop.unknown.charter.com >
<AANLkTimSGghp4TseAV-zgNYakkyH3J_jW2k8peL7EOTv@mail.gmail.com >
<4CAD769D.9090301@enterprisedb.com >
<1286437290.2304.192.camel@ebony >
<4CAD7BED.4050009@enterprisedb.com >
Heikki Linnakangas <heikki.linnakangas@enterprisedb.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
view thread (45+ messages) latest in thread
Message-ID: <27853.1286459569@sss.pgh.pa.us>
Permalink: ../27853.1286459569@sss.pgh.pa.us/
Also on: postgresql.org/message-id/27853.1286459569@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, heikki.linnakangas@enterprisedb.com, simon@2ndQuadrant.com, vincenzo.romano@notorand.it, pgsql-hackers@postgresql.org
Subject: Re: On Scalability
In-Reply-To: <27853.1286459569@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox