People have generally had pretty good performance from VFP tables, so long as they are indexed. Do you have indexes on the Product field and DELETED()? Is this query being run across the network? If the VFP data is sitting on a file server and you are running the query from a workstation, what kind of results do you get if you run the query at the file server?
>Let's say there's a table FRUITS like this:
>
>Product Qty
>-----------------
>BANANA 3
>APPLE 1
>CHERRY 2
>BANANA 5
>BANANA 6
>APPLE 1
>BANANA 8
>BANANA -2
>...
>-----------------
>
>So, we need a sum for each product and it's done with:
>
>SELECT product, sum(qty) FROM FRUITS GROUP BY 1 INTO CURSOR STOCK
>
>
>It works fine, but suppose the table has a lot of records with lots of products (and not only one filed to sum) and the SELECT statement takes some time, which is not acceptable in a situation. It can be done with creating a new table STOCKS, which is updated every time the primary FRUITS changes some values. It's rather unfriendly and complicated to program that kind of solution.
>
>Is there some simple way to do it?
>
>
>Thank's, Zlatko.
Chris McCandless
Red Sky Software