Skip site navigation (1) Skip section navigation (2)

Query plan optimization for CHECK NO INHERIT and single table?

From: Matthias <nitrogenycs(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Query plan optimization for CHECK NO INHERIT and single table?
Date: 2012-08-30 06:00:26
Message-ID: CACECd8iBrmxQLtaRBxQ315ZfgXnW+z2YgBHHZahA=KAOsbWW1A@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hey,

I tried out the new CHECK NO INHERIT feature for inherited tables.
There seems to be an opportunity to generate slightly better query
plans sometimes. E.g. when I do

SELECT * FROM base WHERE partition_id = 3

and there exists only one child table for which partition_id = 3 is
true I guess the query plan could just do a seq/index/whatever scan on
that table. Right now the query plan has an intermediate "Append"
node. This seems only useful if the results of multiple child tables
would need to be included.

-Matthias


Responses

pgsql-hackers by date

Next:From: Albe LaurenzDate: 2012-08-30 07:04:04
Subject: Re: HEAD crashes on windows when doing VACUUM ANALYZE
Previous:From: MatthiasDate: 2012-08-30 05:56:10
Subject: HEAD crashes on windows when doing VACUUM ANALYZE

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group