From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Svetlin Manavski <svetlin(dot)manavski(at)gmail(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Unexpected seq scans when expected result is 1 row out of milions |
Date: | 2011-07-15 17:58:49 |
Message-ID: | 4223.1310752729@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Svetlin Manavski <svetlin(dot)manavski(at)gmail(dot)com> writes:
> The question is: why do we get a seq scan on appqosdata.tcpsessiondata_1 and
> appqosdata.tcpsessiondata_2 even if the planner estimates correctly 1 row
> out of millions could potentially be selected? As you can see ~90% of the
> time is spent on those 2 partitions even if they are not apparently
> different from any of the others.
Well, there must be *something* different about them. Are you sure
they've got the same indexes as the others? It would be useful to see
psql's \d report for those partitions, as well as for one of the
partitions that's behaving as expected. You might also compare the
EXPLAIN results for doing the query on just one child table between
the normal and misbehaving partitions.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2011-07-15 17:59:56 | Re: Hardware advice for scalable warehouse db |
Previous Message | Robert Schnabel | 2011-07-15 16:39:49 | Re: Hardware advice for scalable warehouse db |