Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a postgres performance related doubt. if i want to do a repeatively insert many entries then prepare stament and bind stament is same but bind variables only differ .

Can i able to change the bind variables alone while executing all the staments.
sudo code example :
C++
stmt = insert into test(?,?); // prepare only once 
bind_variable(stmt , var1, var2); // bind only once 
int i=0, j=0; 
while(1000 times) 
{
var1 = i, var2 = j; // change the variables repeatedly 1000 times sqlExecute(stamt); execute(stmt);      // execute 1000 times i ++; j++; 
} 
+
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900