[wp-trac] [WordPress Trac] #11622: switch to PDO::prepare when we require PHP 5.1

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 30 18:22:53 UTC 2009


#11622: switch to PDO::prepare when we require PHP 5.1
-------------------------+--------------------------------------------------
 Reporter:  sirzooro     |       Owner:  ryan                    
     Type:  enhancement  |      Status:  new                     
 Priority:  normal       |   Milestone:  Future Release          
Component:  Database     |     Version:  2.9                     
 Severity:  normal       |    Keywords:  needs-patch dev-feedback
-------------------------+--------------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:14 josephscott]:
 > I like PostgreSQL as much as the next person (probably more), but it's
 not really pertinent to the question.  What does the MySQL query planner
 do? References and methods for reproducing would be helpful.

 I'd have happily posted the output of explain here if the functionality
 worked with anything but SELECT statements in MySQL.

 There are only so many ways to optimize a query, though. If you find my
 own explanation lacking, then:

 http://dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html

 Note that the first paragraph says exactly what I wrote in my previous
 reply:

 > If you need to access most of the rows, it is faster to read
 sequentially, because this minimizes disk seeks.

 And then recall that the whole point of a prepared statement is to not
 need to parse the query and come up with a query plan before executing it.
 And no index can reliably be used if most of the constraints are
 variables.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11622#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list