Subject | Re: [firebird-support] Optimizing SELECT DISTINCT .. |
---|---|
Author | Douglas Tosi |
Post date | 2009-02-03T11:27:52Z |
On Tue, Feb 3, 2009 at 9:11 AM, Harri Vartiainen <harriv@...> wrote:
SELECT FIELD1 FROM TABLE1 GROUP BY FIELD1
This should use the index for an ordered fetch.
hth,
--
Douglas Tosi
www.sinatica.com
> What would be best way to optimize "SELECT DISTINCT FIELD1 FROMNot sure if it's the best, but try:
> TABLE1 ORDER BY FIELD1" query?
SELECT FIELD1 FROM TABLE1 GROUP BY FIELD1
This should use the index for an ordered fetch.
hth,
--
Douglas Tosi
www.sinatica.com