Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help Optimizing a query
Message
From
09/08/2001 20:34:49
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00542086
Message ID:
00542091
Views:
17
>
>Select ;
>>        Ramp, ;
>>        Vendor, ;
>>        VendCity, ;
>>        VendSt, ;
>>        HourCount ;
>>    Where ;
>>        Upper( Ramp ) = 'CHICAGO' And ;
>>        Between( HourCount, 37, 48 ) And ;
>>        Upper( Vendor ) = 'NIKE' And ;
>>        Not Empty( Ramp ) And ;
>>        Empty( HourCount ) ;
>>    Into Cursor qVendorTimes NoFilter
>>
>>
>>I'm afraid to break the SQL down into multiple SQL's because writing out 27,000 records is going to be slow.
>
>There are 2 pairs of conditions there that seem wrong:
>
>upper( ramp) = 'CHICAGO' and not empty( ramp)
>I would remove the "not empty( ramp)" part
>
>and
>
>between ( hourcount, 37, 48) and empty( hourcount)
>Make up your mind... you want specific hourcounts or empty hourcounts?
>
>Alex

That's a fair assesment. Right now, after removing those two additional Not Empty()'s is about .8 seconds faster.
It is taking 7.854 seconds.
I need it to execute in 2 seconds or less.
Previous
Reply
Map
View

Click here to load this message in the networking platform