>Bernard,
>
>Have you tried creating an index tag on the inv_date field? Make sure the index expression is the same as the expression in your WHERE clause e.g. INDEX ON YEAR(inv_date). Otherwise your query will not be optimized.
>
>George
I know about index's george but sometimes the queries can be adhoc. What I described was just an example to show that the query is simple and no join is involved. It is not possible to create an index for every query that I may need!