Subject Re: [firebird-support] Sort precedence in execution plan
Author Arno Brinkman
Hi,

One more suggestion :-)

> select saleprice , count(saleprice)
> from presence
> where productID = 1959201 and valuedate = '2004-04-01'
> group by saleprice
> order by saleprice
>
> Then, I don't know how to trick the optimizer so that it picks the best
> indice (not the one on SalePrice).

SELECT
saleprice,
count(saleprice)
FROM
presence
WHERE
productID = 1959201 and valuedate = '2004-04-01'
GROUP BY
saleprice, saleprice
ORDER BY
saleprice

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Interbase and Firebird users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://80.126.130.81