Tom Lane <[EMAIL PROTECTED]> writes:
> And this decision is made separately for each child table, so the fact that
> a seqscan might be the best bet for the target partition doesn't stop the
> planner from using the indexscan in other partitions.
That was the detail I was missing. I'm surprised because I actually tested
this before I sent the message and saw a plan like this with a single
sequential scan node despite the three child tables:
staging=> explain select * from _test where a=1;
QUERY PLAN
------------------------------------------------------
Seq Scan on _test (cost=0.00..22.50 rows=5 width=4)
Filter: (a = 1)
(2 rows)
[This is on 7.4, maybe the 8.0 plans are more explicit though I don't recall
any mention of changes in that area]
--
greg
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend