Bill,
Looking back at your original message, I assume that the slowness may be caused by using HAVING instead of WHERE: Since there is no WHERE clause, there is nothing to optimize here! All records are fetched! Perhaps this explains why you didn't get a noticable speed difference with, and without, the deleted() index.
VFP works in this sequence:
1) Fetch records that meet the criteria for the WHERE clause. Use R.O. where aplicable. (If there is no WHERE clause, all records will be fetched here!).
2) Group records with the GROUP BY clause.
3) Apply a filter to the combined records, with the HAVING clause.
Perhaps you can re-arrange your query, so that you filter out records first. That is, apply a WHERE clause.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)