Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem
Message
De
24/07/2000 10:55:17
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00396098
Message ID:
00396160
Vues:
15
>>>By the way, I have heard that SQL's work slower when tables are ordered. Is that true?
>>>
>>
>>Yes, where reference is made to an existing open table by alias, and the work area has an index in effect, since if there's an index in effect on the alias and the table needs to be traversed record by record, it'll have to be traversed in the index order in effect in the work area referenced. This means that each time you move from one record to the next, the index is consulted to determine which record gets visited next. If no index is active (SET ORDER TO 0) then the overhead of record traversal by lookup in the index is removed.
>
>Ed,
>How is this possible? A SQL Select opens the the tables again in a new work area in order to have free reign to determine the best index to use, etc. How does the original order affect it?
>
>I can see where commands like LOCATE or SCAN would be hurt.

Try something like:

USE ABCDEF ALIAS MNO EXCLUSIVE ORDER XYZ
SELECT * FROM MNO ;
WHERE Fld1 = Expn1 ;
INTO CURSOR Temp
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform