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

effective SELECT from child tables

From: "Ilia Kantor" <ilia(at)obnovlenie(dot)ru>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: effective SELECT from child tables
Date: 2005-09-27 17:30:55
Message-ID: auto-000571351417@umail.ru (view raw or flat)
Thread:
Lists: pgsql-hackers
Let table A be inherited by A1, A2, A3.

 

How to select from A records where actual relations are A1, A2 ?

 

I found a way somewhere, it sounds like SELECT  : WHERE tableoid IN (a1.oid,
a2.oid),

but tableoid checks actually do seq scan.

 

Like: SELECT * FROM sometable WHERE tableoid =anything will do seq. scan on
sometable..

 

So such way seems very ineffective: it seq scans and filters records..

 

Maybe new constraint_exclusion staff could help to exclude non-matching
tables from inheritance query ?

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-09-27 17:51:03
Subject: Install pg_regress script to support PGXS?
Previous:From: Jeffrey W. BakerDate: 2005-09-27 17:26:28
Subject: Re: [PERFORM] A Better External Sort?

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