Subject Re: [firebird-support] Simple question
Author Arno Brinkman

> > Is it possible to optimize this query:
> >
> > select
> > field2
> > from
> > table
> > where
> > field1 = ( select max(field1) from table )

> what's wrong with
> select max(field1), field2 from table

That it doesn't work :-D
Field2 must also be in a aggregate function or GROUP BY clause.

Comming back to the original question.
An DESC Index on Field1 would help in this case, but how many duplicates are
there (or gona be) on Field1?

Arno Brinkman

Firebird open source database (based on IB-OE) with many SQL-99 features :

Support list for Interbase and Firebird users :

Nederlandse firebird nieuwsgroep :