Subject RE: [firebird-support] what schema is better ?
Author Leyne, Sean
Stephane,

> Table ZillionRows (
> OBJECTID integer not null,
> RANK smallint not null,
> SERVER_ID integer not null,
> VOLUME_ID smallint not null,
> ID integer not null,
> KEY longint not null,
>
> PRIMARY KEY OBJECTID, RANK
> );
>
> or
>
> Table ZillionRows (
> OBJECTID integer not null,
> RANK smallint not null,
> NAME VARCHAR 18 NOT NULL,
>
> PRIMARY KEY OBJECTID, RANK
> );
>
>
> you understand in the second case i simply concat SERVER + VOLUME_ID + ID
> + KEY in a VARCHAR Field
>
>
> i select the rows only like this
>
> select * from ZillionRows where OBJECTID=xxx;

If you will always be querying by OBJECTID, I would vote for separate fields (option #1) since the rows would "block out" in the database pages.


Sean