How does PG Inheritance work?

Поиск
Список
Период
Сортировка
Искать
От
Announce
Тема
How does PG Inheritance work?
Дата
Msg-id
KBEKKNMFLELKGIADDEPEEEBKCDAA.truthhurts@insightbb.com
Ответ на
Список
Дерево обсуждения
Re: How Can I use OO concepts? Chris Browne <cbbrowne@acm.org>
How does PG Inheritance work? "Announce" <truthhurts@insightbb.com>
Re: How does PG Inheritance work? Tom Lane <tgl@sss.pgh.pa.us>
Re: How does PG Inheritance work? "Announce" <truthhurts@insightbb.com>
How does Postgres internally handle inheritance under the following
scenario?
Using sample tables similar to a previous post:

 CREATE TABLE employee(id primary key, name varchar, salary numeric(6,2));
 CREATE TABLE programmer(language varchar, project varchar) INHERITS
(employee);
 CREATE TABLE representative (region varchar) INHERITS (employee);

Let's say for example's sake, there are 10 million rows of PROGRAMMER data
but only 100 rows of representative data.  Will a query (select, update,
insert, etc) on the REPRESENTATIVE table take a performance hit because of
this?

It seems like the child-table is really not concrete. It seems like it is
just a "pointer" to certain rows in the parent table which is then able to
discern which inherited "table-type" it is.

Thanks,

Aaron

В списке pgsql-novice по дате отправления
От: Oliver Elphick
Дата:
От: ig@freemail.gr (Çëßáò Ãêïõíôáñüðïõëïò)
Дата:
FAQ