Subject Re: [firebird-support] Newbie: A few questions...
Author Helen Borrie
At 11:39 AM 6/08/2004 +0200, you wrote:
>Hi,
>
> > Just beginning to work with FireBird. So far looks really cool. Some
> > questions I have run into, which you guys and gals may be able to
> > help me out with:
> >
> > 1. Can you rename a table with SQL syntax in FireBird?
> > (Obviously, one can create a new table, copy data across, and then
> > drop the old table, but is there a 'Alter table RENAME oldtablename
> > to newtablename'?)
>
>No, you cannot.
>
> > 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 1.5.

Data in Firebird are not stored in tabular structures at all and don't need
to be. Mixed *sort* orders don't come from indexes in SQL, they are created
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

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:

http://www.volny.cz/iprenosil/interbase/ip_ib_indexcalculator.htm

Somebody in Norway, PLEASE send Martijn some Bamsemums,
URGENTLY!! Clinical dosage necessary.

/heLen