Postgres query is very slow when using a parameter instead of an hardcoded string
问题 I am running into this Postgres issue where the same query takes a long time to execute if I use a parameter vs hardcoding its value on the query string. The column name is 'media_type' and it's a VARCHAR(20). I am running these queries from PHP, using Symfony2 and Doctrine2 ORM and the table in question has about 1.000.000 records. Do I have a problem on my query? Can it be a Postgres configuration problem? 1 - Hardcoded value for media_type duration: 5.365 ms parse pdo_stmt_00000001: SELECT