Subject Re: [firebird-support] Optimizing SELECT DISTINCT ..
Author Douglas Tosi
On Tue, Feb 3, 2009 at 9:11 AM, Harri Vartiainen <harriv@...> wrote:
> What would be best way to optimize "SELECT DISTINCT FIELD1 FROM
> TABLE1 ORDER BY FIELD1" query?

Not sure if it's the best, but try:
SELECT FIELD1 FROM TABLE1 GROUP BY FIELD1
This should use the index for an ordered fetch.

hth,
--
Douglas Tosi
www.sinatica.com