Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re-using SQL Cursors
Message
De
27/09/2000 19:42:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00421261
Message ID:
00421826
Vues:
15
>The cursors are created within a SCAN through a dataset, and therefore are liable to be created MANY times. Essentially, it becomes a memory management issue.
>
>I've modified the code so that instead of creating a cursor, I simply direct the result set to the query NOCONSOLE. For the bulk of the queries, I'm simply looking for record counts, which is one reason why I'm reusing the cursor alias, and I believe SELECT is faster than a COUNT. If I'm wrong, feel free to enlighten me. So, for each loop, I'm directing 4 to Query and one to Cursor, rather than 5 to Cursor.
>
>Thanks for answering.
>
>John


COUNT should be as fast as SELECT as long as there are index tags for the FOR clause so Rushmore kicks in.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform