Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using requery() in batch processing
Message
De
02/04/1999 09:48:31
 
 
À
02/04/1999 00:31:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00204217
Message ID:
00204634
Vues:
13
The individual tables are quite small -- under 1000 records for the most part. One of them is 5600 records, but the rest are small. I have a 10 meg network, but I don't think that is the problem. I suspect its the low end server and odbc that's killing me. Each parameterized view requery takes about a quarter of a second, and I hit the need to requery about 50-75 times per master record. I need to bite the bullet and rewrite my program with the tables already open. Or maybe I can rewrite in such a way as all the lookups are done at once and then I pick and choose the records. I mean, instead of doing 20 lookups into the address lookup table for each master record, do one lookup getting all twenty records, and then going from there.

Thanks for everyones help. I'll let ya all know how it came out.

>How large are your tables? I have similar situations where I have to open a view on a 50,000+ record SQL Server database as a remote view. It's none too swift, averaging about 15-30 seconds to come across a wide-bandwidth connection.
>
>What may be a better solution is to create a preprocessed (right word?) view in your server database and open that. Let the server db do the work. Should be faster, in theory.
>
>
>>I posted this in the client server section, but I failed to mention that I am using ODBC to talk to my database. That slows stuff down too. :-(
>>
>>I guess there is no easy answer. My current process takes about 30 seconds per master record.
>>
>>I wanted to avoid the slow startup costs of loading every record from every table at the start of the program, but I figured that I would have to deal with each master record only taking under 10 seconds. Not a half a minute.
>>
>>I'll pay the overhead at the top of the program. Tell the users not to exit during the day... *sigh* another plan gone astray.
>>
>>>>I have a parametertized view with six fields and one where condition, and nothing else. It takes about .5 seconds to requery() it. Is that normal?
>>>
>>>I've just been timing my code, and I have a fairly simple local view of 12 fields, 2 parameters in Where, and it takes about .012 seconds each requery from a fairly small table, small result set, with indexes on Where fields, not much longer without indexes. So there's very little overhead in a Requery() command itself. Slowness may result from lack of index on Where field, large result set, network overhead, perhaps, in your case...also, index on deleted can slow it down.
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform