Search Postgresql Archives

Re: Another question about partitioning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, I enter query manually while testing. Here are explain plans :

for select count(*) from poll_3 where eid = 72333

"Aggregate  (cost=34697.64..34697.65 rows=1 width=0)"
"  ->  Seq Scan on poll_3  (cost=0.00..34650.40 rows=18893 width=0)"
"        Filter: (eid = 72333)"


for for select count(*) from poll where eid = 72333

"Aggregate  (cost=320001.59..320001.60 rows=1 width=0)"
"  ->  Append  (cost=0.00..319570.78 rows=172323 width=0)"
"        ->  Seq Scan on poll  (cost=0.00..27.50 rows=17 width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_0 poll  (cost=0.00..14348.85 rows=9014
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_1 poll  (cost=0.00..34796.82 rows=18735
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_2 poll  (cost=0.00..34993.84 rows=18527
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_3 poll  (cost=0.00..34650.40 rows=18893
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_4 poll  (cost=0.00..34230.55 rows=18099
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_5 poll  (cost=0.00..34267.64 rows=17543
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_6 poll  (cost=0.00..34469.73 rows=18719
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_7 poll  (cost=0.00..33642.98 rows=17968
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_8 poll  (cost=0.00..32199.15 rows=16480
width=0)"
"              Filter: (eid = 72333)"
"        ->  Seq Scan on poll_9 poll  (cost=0.00..31943.33 rows=18328
width=0)"
"              Filter: (eid = 72333)"



On Tue, 2007-11-27 at 17:40 -0800, paul rivers wrote:
> Alex Vinogradovs wrote:
> > Hello all,
> >
> >
> > I have a table which is partitioned by range into 10 pieces with
> > constraint exceptions. Constraint exceptions is enabled in server
> > configuration too. For some reason, queries to the master table
> > are still slower than direct queries against partitions. Is there
> > any real reason for that, or I should look into misconfiguration ?
> >
> > Thanks!
> >
> >
> > Best regards,
> > Alex Vinogradovs
> >   
> Is that true even if you type the query yourself in psql and ensure that 
> the values for the partitioned columns are constants in the where 
> clause?  Can you post an explain of the sql?
> 
> Paul
> 

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux