Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index definition for fully optimizable view ?
Message
 
 
À
04/07/2002 17:19:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00675416
Message ID:
00675439
Vues:
10
>>>Torgny,
>>>
>>>I don't know if (SQL) BETWEEN is optimizable. Apparently, BETWEEN() (the function) *is*.
>>
>>Yes, it is.
>
>Good to know. Have you got a reference so that I can write another Documentation note to MS about this being documented in the CORRECT place?


I know it from my expirience but following test confirms it
USE (HOME(2) + "\Tastrade\data\orders")
SYS(3054,11)
SET DELETED OFF
SELECT * FROM orders ;
	WHERE order_id BETWEEN "    25" AND "    40" ;
	INTO CURSOR crsTemp
>
>>
>>>If you are running with SET DELETED ON and you do not hav a TAG on DELETED() then partial may be the best you can get BUT... (repeat: BUT) that may well be OK!
>>>
>>>IF your table has few or no deleted records, then running withOUT a TAG on DELETED() is most likely best, because its overhead is very large and can easily outweigh the benefit when there are few records deleted.
>>>
>>You can TEMPORARILY add a TAG for DELETED() and check the optimization level. If it shows FULL then you will know that the cause of the "PARTIAL" was the missing TAG on DELETED() and then you can REMOVE THAT TAG with confidence.
>>
>>Temporary setting SET DELETE OFF will achive the same result.
>
>Don't know why I typically take the harder way, but I usually do. Thanks.


The same happens to me all the time. I just don't tell anybody. :)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform