Subject Odp: [firebird-support] Historic tables design

Flag for historical is not a good concept.
But you have it already i think in table e.g. date or timestamp ..

Karol Bieniaszewski

----- Reply message -----
Od: "Aldo Caruso" <aldo.caruso@...>
Do: <>
Temat: [firebird-support] Historic tables design
Data: śr., lip 31, 2013 04:42

it is common in some business rules that a table has a companion

table of historic records. The historic table has the same structure

than the active records table, but is less accessed than the active

table. On the other hand, the historic table grows steadly, ending up

with far more records than the active one ( records deleted from the

active table go to the historic one ).

My question is the following: should both tables be merged into a

single table, with an additional field marking historic records ? Will

the queries on this table be slower than having them separated ?

I know that an index taking into account that additional field

would speed up the queries but, on the other hand, such an index would

be a very poorly selective one, because the additional field would only

have two values ( 0 and 1 ) like any boolean field.

Thanks for any advice.


[Non-text portions of this message have been removed]