The languages like Perl, Java etc supports two way to execute the SQL. You have given both methods in perl. In method 1 (Non prepared statement) every time $dbh->do($SQL) is called, the sql will be prepared and executed. So in your case its prepared and executed about 70,000 times. In case of Method 2, the SQL is prepared once and executed 70,000 times. i.e. you save time for some 70,000 prepare ! Obviously, method two is much faster :)
Cheers !
--VC
There arethree sides to any argument.....
your side, my side and the right side.
In reply to Re: which method is more faster?
by atemon
in thread which method is more faster?
by pysome
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |