Re: A Guide to Constraint Exclusion (Partitioning)

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: A Guide to Constraint Exclusion (Partitioning)
Дата
Msg-id 874qalbcoj.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: A Guide to Constraint Exclusion (Partitioning)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: A Guide to Constraint Exclusion (Partitioning)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: A Guide to Constraint Exclusion (Partitioning)
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: For review: Server instrumentation patch