Table inheritance and performance

Поиск
Список
Период
Сортировка
Искать

Table inheritance and performance

От:
Jean-Christian Imbeault <jc@mega-bucks.co.jp>
Дата:
I'm in the design stage of a database and I am thinking of using table 
inheritance for the first time. However I've been wondering if table 
inheritance would be all that useful and what, if any, performance 
penalties there might be.

For example, say I have a parent table FRUITS and two children, APPLES 
and ORANGES, where the APPPLES and ORANGES tables are identical. 
Performance-wise would it be any different from having just one table, 
FRUITS, and a column TYPE which would be a foreign key into a types 
table (1 = APPLE, 2 = ORANGE, etc ...). Would using inheritance in this 
case be a performance hit compared to a simple type column with lookup 
table? Or would there be no penalty for using inheritance?

Thanks,

Jean-Christian Imbeault

FAQ