Subject Re: [firebird-support] indexing a status column
Author Milan Babuskov
sugi wrote:
> Will it be a good idea to either :
> a. create an index on the 'status' column ?

No.

> c. split the table into five different tables with identical structure,
> and remove the 'status' column altogether ? (I don't like the idea at
> all, but someone suggested this, so i'll ask for second opinions).

Good idea. You can use a view (named as your table is named now) to get
it all together when needed:

create view current_name_of_your_table (col1, col2, col3, status)
as
select col1, col2, col3, 1 from table1
union all
select col1, col2, col3, 2 from table2
union all
select col1, col2, col3, 3 from table3
union all
select col1, col2, col3, 4 from table4
union all
select col1, col2, col3, 5 from table5;


So you can still use it the way you use it now, and you have much faster
queries when only one is needed.

HTH

--
Milan Babuskov
http://fbexport.sourceforge.net