prepared statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all:

We are use PHP PDO's Prepared statement to send SQL query to Mysql server.
According to PHP PDO doc, Prepared statement are fast for executing multiple
SQL queries with same parameters. "by using prepared statement you avoid
repeating the analyze/compile/optimize cycle"

Our application is a web application, each request will have a new Prepared
statement handler generated by PDO Lib. so prepared statement actually
slower than non-prepared statement.

I just want to know how can we cache  Prepared statement handler, So we can
re use it in later http request.

for example:

we have a query to pull out all product information from mysql db, each
query just has a different product id , all other parts are same. 
   
-- 
View this message in context: http://www.nabble.com/prepared-statement-tp18123270p18123270.html
Sent from the PHP - General mailing list archive at Nabble.com.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux