|Subject||Re: [firebird-support] MAX(ID) Performance|
> I have one table into firebird (2.1.3) databse with structure:You need an DESCENDING index on ID.
> ID - integer (keyfield)
> NAME - varchar (indexed)
> DESCRIPT - varchar
> and about 3.000.000 records in it.
> I don't want to say that Oracle Express Edition is better than FirebirdSQL but when I call
> SELECT MAX(ID) FROM TABLE1
> Oracle returns 3.005.101 for a 2 secounds
> Firebird returns 3.005.101 for a 10min and 15 secounds on same machine
> What is wrong with Firebird in my case?
Btw, if you need that to do something like MAX(ID) + 1 for implementing
an auto-increment thingy, then you'd better try generators in Firebird.
Aka sequences in Oracle.
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and