Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is Top N rushmore optimizable?
Message
From
02/09/1998 00:56:00
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00132202
Message ID:
00132205
Views:
15
>Table A with indexes on tCreated, iStopCode, iMachineID. In a view left outer joined to TableB on iCode into the iID PK for the table. TableA 1 million records, TableB 60 records. Filtered on iMachineID=?piMachine and iCode > 0, Setting view order to tCreated DESCENDING and have TopN set to 20 records. The ?piMachineID should filter TableA to about 10K records. Basically I'm trying to get the last 20 records for iCode>0.
>
>The view is taking on order of 1 minute to requery() obviously it's not optimizing. Is the TopN or the descending order of the view killing it?

I would say that neither of them. Still, for both of them, the index must be created. Did you use the sys(3054) to see the optimization status? Is an outer join optimizable?

I assume you also have an index on iCode and deleted().

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform