PDO::prepare deallocate & PDOStatement::closeCursor()

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

 



Hi all,

I got 2 questions about PDO:

1. Let's say that I create the following prepared statement:
$PDOStatement = $DB_Conn->prepare("INSERT INTO test (name) values (?)");
And after 50,000 inserts (with $PDOStatement->execute(array('somevalue'));)
I want the database to analyze, compile and optimize it's plan again so it
will be more efficient for it's next inserts (actually is that true at
all?!?), does repeating the same command will deallocate the prepared
statement at the database & replace it with the new prepared statement? (new
plan).
If not, how can I deallocate it then?

2. At the PHP manual of PDOStatement::closeCursor it's written that "This
method is useful for database drivers that do not support executing a
PDOStatement object when a previously executed PDOStatement object still has
unfetched rows. If your database driver suffers from this limitation, the
problem may manifest itself in an out-of-sequence error.".
Anyone know if the PostgreSQL suffer from this problem or not?

Thanks a lot in advance,
Ben-Nes Yonatan

[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