From: | Alex Vinogradovs <AVinogradovs(at)Clearpathnet(dot)com> |
---|---|
To: | paul rivers <rivers(dot)paul(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Another question about partitioning |
Date: | 2007-11-28 19:49:47 |
Message-ID: | 1196279387.1152.52.camel@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2007-11-28 20:03:27 | Re: Recheck condition |
Previous Message | Andrew Dunstan | 2007-11-28 19:32:09 | Re: [HACKERS] plperl and regexps with accented characters - incompatible? |