Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speeding up my query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01034597
Message ID:
01034657
Vues:
23
Thank you Sergey (as always), I learn something today.


>>Today my way of expression is horrible (not that other days is not) :o)
>>You said that SELECT-SQL doesn't use already opened files, but if I run something like SELECT * FROM MyTable INTO CURSOR cTest and then open Data Session window, there is 2 aliases there - MyTable and cTest, but if do something like:
>>
>>USE MyTable
>>SELECT * FROM MyTable INTO CURSOR cTest
>>
>>and open Data Session window again only 2 aliases are there - MyTable and cTest, there is no addional alias like "B" or "MyTable_B". That is why I think SELECT-SQL uses already opened tables.
>
>If table is not open before a query, VFP'll open it and use in a query. It stays open after query is completed.
>If a table is already open, than VFP will open it similar to USE AGAIN with a temp alias and use it in a query. Such tables open by VFP with temp aliases are closed after the query is completed.
>
>You can see it yourself by creating a simple UDF and running following query (you can use any tyable instead of mytable)
* FUNCTION myudf
>SUSPEND
>RETURN "A"
>...
>SELECT *, myudf() ;
>  FROM mytable ;
>  INTO CURSOR temp
>
Run query twice. First time with mytable claused and second open before query and anylize all workareas in the Datasession window.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform