Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quick retrieval
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00327540
Message ID:
00328615
Views:
26
>Woops...I just noticed your last note about non-filtered index.
>I am not familiar with this expression. So I then added 3 new indexes
>in the actual CDX: one on FA_GENRE, one on ABS(FA_Total) and one on
>ABS(FA_ZPayed). But I'm not sure if this is what you mean.
>
>Let's redo test 3 with these new indexes:
>
>SELECT * FROM Facture WHERE (FA_GENRE = "FA") AND ;
>   (ABS(FA_TOTAL) > ABS (FA_ZPAYED)) INTO TABLE Tmp ORDER BY CL_Code
>
>* It now takes 28.25 seconds
>
>What do you think?
>
<hr>
Let's try an index on ABS(FA_TOTAL) - ABS(FA_ZPayed) called Balance

SELECT * FROM Facture ;
  INTO TABLE Tmp ;
 WHERE FA_GENRE = "FA" AND ;
       ABS(FA_Total) - ABS(FA_ZPayed) > 0 ;
 ORDER BY CL_CODE


>Réal Philippon
>
>==============================
>>What about:
>>
>
>>SELECT * FROM Facture WHERE (FA_GENRE = "FA") AND ;
>(ABS(FA_TOTAL) > ABS(FA_ZPAYED)) INTO TABLE Tmp ORDER BY CL_Code
>
>The thing is you cannot ask SQL to use a specified index. VFP will determine which index to use based on the SQL conditions. To have Rushmore work with the above SQL, you will need a non-filtered index on:
>>- FA_Genre
>>- ABS(FA_Total) and
>>- ABS(FA_ZPayed)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform