Re: Inheritance a burden?

Поиск
Список
Период
Сортировка
От Curt Sampson
Тема Re: Inheritance a burden?
Дата
Msg-id Pine.NEB.4.44.0207201414080.553-100000@angelic.cynic.net
обсуждение исходный текст
Ответ на Inheritance a burden?  (reina@nsi.edu (Tony Reina))
Ответы Re: Inheritance a burden?  (Tony Reina <reina@nsi.edu>)
Список pgsql-hackers
On 19 Jul 2002, Tony Reina wrote:

> Just out of curiosity, I built a new
> database with the same data but didn't use the inheritance (i.e. each
> table had its own copy of those common fields). It looks like about a
> 20% increase in execution speed when I run my programs side by side.

Have you tried it using the standard relational method of doing this?
(I.e., you put the common fields in one table, and the extra fields in
other tables, along with a foreign key relating the extra fields back
to the main table.) That would more accurately replacate what you were
doing with inheritance.

I have a suspicion, in fact, that inheritance may just be syntatic sugar
for doing this and adding a couple of views. :-)

Anyway, it could be that by denormalizing the data (copying it to the
other tables), you reduced the number of joins you do, and so you got a
performance increase.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org   Don't you know, in this new Dark Age, we're
alllight.  --XTC
 



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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: preserving statistics settings
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCH] Win32 native fixes after SSL updates (+more)