Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Asynch much slower vs Synch
Message
 
 
À
15/03/2002 11:41:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00633472
Message ID:
00633945
Vues:
21
This message has been marked as a message which has helped to the initial question of the thread.
Take a look at faq #8150 SPT cursor fetching and progress displaying for SPT cursor downloading.

>Hi all,
>
>I was just wondering if there are other settings I should set to speed up the asynch sqlexec() query. The example below shows that running the same query synch mode is much faster than in asynch mode. Is this always the case? Changing the fetchSize to a bigger value helped just a bit.
>
>Of course, this is just an example using the SQL Server Northwind database. Any real world data with more records than the example would show you better comparison. The backend table I query has many records with joins to other tables so that I need the asynch mode to provide user-feedback. The data is not displayed to the user and I need to process the returned cursor at once; meaning: background fetching is not really a viable solution.
>
>Any inputs most welcome.
>
>x=sqlconnect('Northwind')
>cursorsetprop("FetchSize",10000,0)
>z=datetime()
>sqlexec(x,'select * from dbo.[order details]') && zoom, zoOM, ZOOM!!!
>?datetime()-z
>sqlsetprop(x,'Asynchronous',.t.)
>i = 0
>z=datetime()
>do while .t.
>   if sqlexec(x,'select * from dbo.[order details]') # 0 && chug, chUG, CHUG!!!
>      exit
>   endif
>enddo
>?datetime()-z
>sqldisconnect(x)
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform