PDO Statement Taking 400x Longer Than MySQL CLI [duplicate]
问题 This question already has answers here : Why are certain types of prepared queries using PDO in PHP with MySQL slow? (3 answers) Closed last year . I am running a PDO prepared statement to select from a table of around ~6k rows. This particular query ends up returning all of the rows due to the WHERE statement which has ~5k pIds. The table has an index on the pId column as well. SELECT * FROM table_a WHERE pId in (?, ? ,? ....) This query takes 4.5 seconds to run in php and when run in the