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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Tue, 27 Sep 2005 21:30:55 +0400
  • Message-id: <auto-000571351417(at)umail(dot)ru>

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 ?



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group