Re: plan time of MASSIVE partitioning ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leonardo Francalanci <m_lists(at)yahoo(dot)it>
Cc: Boszormenyi Zoltan <zb(at)cybertec(dot)at>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plan time of MASSIVE partitioning ...
Date: 2010-10-29 15:23:38
Message-ID: 2008.1288365818@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Leonardo Francalanci <m_lists(at)yahoo(dot)it> writes:
> I tried a simple test case:

> create table t (a integer, b text);

> DO $$DECLARE i int;
> BEGIN
> FOR i IN 0..9000 LOOP
> EXECUTE 'create table t' || i || ' ( CHECK (a >' || i*10 || '
> and a <= ' || (i+1)*10 || ' ) ) INHERITS (t)';
> EXECUTE 'create index tidx' || i || ' ON t' || i || ' (a)';
> END LOOP;
> END$$;

> explain select * from t where a > 1060 and a < 1090;

This is going to be dominated by constraint exclusion checking. There's
basically no fix for that except a more explicit representation of the
partitioning rules. If the planner has to make 8999 theorem proofs to
remove the 8999 unwanted partitions from the plan, it's gonna take
awhile.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2010-10-29 15:33:00 Re: Tab completion for view triggers in psql
Previous Message Tom Lane 2010-10-29 14:22:48 Re: sorted writes for checkpoints