Subject | RE: [firebird-support] what schema is better ? |
---|---|
Author | Leyne, Sean |
Post date | 2010-12-09T18:39:31Z |
Stephane,
Sean
> Table ZillionRows (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.
> 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;
Sean