Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any ideas on speeding up this query
Message
From
23/01/2008 06:54:46
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01284133
Message ID:
01284373
Views:
18
An index tag on deleted() is normally a bad idea, UNLESS he uses VFP9. This will depend on the situation, but in most cases this index will actually slow down a select. Whether it will slow down or speed up the selects depends on many factors, the most important factor is how many records are deleted in relation to how many records are not deleted.

>Add an index on DELETED() on all tables involved in the query. Make it a binary index if you are using VFP9.
>
>>Naomi, I've tried the following:
>>
>>
>>SELECT Ordsize.orderprodid,;
>>  SUM(Ordsize.ordered) AS totordered,;
>>  SUM(Ordsize.allocated) AS totallocated,;
>>  SUM(Ordsize.shipped) AS totshipped;
>> FROM ordsize ;
>> GROUP BY ordsize.orderprodid
>>
>>
>>
>>The SYS(3054,11) Result is:
>>Rushmore... NONE
>>
>>Then I tried, as per your suggestion:
>>
>>SELECT Ordprod.orderid, Ordsize.orderprodid,;
>>  SUM(Ordsize.ordered) AS totordered,;
>>  SUM(Ordsize.allocated) AS totallocated,;
>>  SUM(Ordsize.shipped) AS totshipped;
>> FROM ;
>>     Ordsize ;
>>    INNER JOIN ordprod ;
>>   ON  Ordprod.orderprodid = Ordsize.orderprodid ;
>> GROUP BY Ordsize.orderprodid, Ordprod.orderid
>>
>>
>>Again the SYS(3054,11) Result is:
>>NONE for both tables.
>>
>>Any more ideas,
>>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform