Subject Re: [firebird-support] Newbie: A few questions...
Author Martijn Tonies
> > > 2. Does FireBird support Multi-component keys with mixed sort orders?
> > > For example 1 key, 2 fields, 1 ascending, and 1 descending?
> >
> >No, sort orders are on a per-index basis. Primary, unique and Foreign
> >key auto-created indices are ASC only.
> You can create DESC primary (and matched order foreign) keys in Firebird

Oh yes, I forgot about that one. Quick question (and without trying):
what happens if you mix an ASC FK index with a DESC PK index?

> Data in Firebird are not stored in tabular structures at all and don't
> to be. Mixed *sort* orders don't come from indexes in SQL, they are
> by your SQL statement specification, in an ORDER BY clause. Speed can be
> gained for these sorts (sometimes) by defining indexes to support them,
> e.g. for

Obviously, I meant the sort-orders in the indices - not the sort orders
in a final resultset.

> order by col1 desc, col3
> you might gain some speed by creating a DESC index for col1 and an ASC
> index for col3.
> > > 3. What is the maximum key size in FireBird, and is it affected by
> > > the Database Page Size?
> >
> >256
> 253 for character set NONE, 252 or less for all other character sets.
> There's a calculator here:
> Somebody in Norway, PLEASE send Martijn some Bamsemums,
> URGENTLY!! Clinical dosage necessary.

ok ok ... 256 or its whereabouts... :-)

Darn... it's too hot today... and Yesterday, for that matter.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Upscene Productions