Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Connection to Database
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Oracle
Divers
Thread ID:
01096643
Message ID:
01096729
Vues:
14
>Hi,
>I would like to know, is it ok to have 5 different connection Handle to the same database. I will explain myself.
>
>My connection are made
>
>#CODE#
>This.nConn1 = SQLCONNECT("SomeODBC", "User", "Pass")
>This.nConn2 = SQLCONNECT("SomeODBC", "User", "Pass")
>This.nConn3 = SQLCONNECT("SomeODBC", "User", "Pass")
>This.nConn4 = SQLCONNECT("SomeODBC", "User", "Pass")
>This.nConn5 = SQLCONNECT("SomeODBC", "User", "Pass")
>#CODE#
>
>Then a prepare a different SQL statement for each connection that I call in a loop, the result of SQL 1 is a bind variable to SQL 2 and SQL 2 to SQL3... you probably get the picture. that loop is called about 100 000 times. I see a 7-8% gain with using 5 different connections instead of only one and reissuing SQLPrepare between each call. Beleive it or not, it's a lot faster (about 900-1000% gain) doing all my joins like that (completely manual via multiple request) than sending one big SQL statement with a 5 table inner join for Oracle (The Oracle database doesn't contain any indexes, and joins are made of 2 sometime 3 fields, each tables have at least 1 million reccords).
>
>I really like the 7-8% gain, but I know that Connection Handles are something really precious.
>
>Please advise.
>
>I need something that look really similar for an export, but the number of connection will be 12, is it still ok?
>
>btw how can my code look like code inside of UT?


I'm not sure about your connections but to make code look like code enclose it in a

LESSTHAN pre MORETHAN
your code here as code followed by a
LESSTHAN /pre MORETHAN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform