Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM [SQL Cursor]
Message
De
24/12/2008 08:32:45
 
 
À
23/12/2008 16:42:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01369081
Message ID:
01369589
Vues:
17
>>>Hi Sergey,
>>> Yes, the question is: why is VFP creating an in-memory cursor w/o physical presence on the disk despite the use of NOFILTER in the SQL Select statement. I have a workaround that works, but I'd prefer to be able reliably to create a cursor with a disk presence.
>>
>>Hmm, VFP9 help says, for NOFILTER:
>>
>>"Including NOFILTER can reduce query performance because it creates a temporary table on disk. When the cursor is closed, the temporary table is deleted from disk."
>>
>>I'm wondering if the help is not quite correct - it may be more correct to say that "it creates a conventional VFP cursor, rather than a filtered result set" and, as such, this cursor can be used in further queries (where a filtered result set cannot).
>>
>>A VFP cursor may or may not have a disk presence. If you want a guaranteed disk presence, you should probably look at INTO TABLE with a temporary file name generated by SYS( 2015 ) etc. However, in that case you'd need to clean up after yourself when you're finished with it (i.e. delete the temp table).
>
>I work a lot with this kind of code, and I have never seen a cursor created with Select .. Nofilter which is not a .real tmp file. AFAIK all cursors, exect filtered tables, are real files. Try
>Create Cursor test1 (name c(10))
>Display Status
>You will see that a .tmp file is created in your tempfiles directory.
>

In fact, while a file is created in the file system, there isn't always a disk presence. But, in my experience, that doesn't actually matter.

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform