diff options
Diffstat (limited to 'includes/database/pgsql/database.inc')
-rw-r--r-- | includes/database/pgsql/database.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/database/pgsql/database.inc b/includes/database/pgsql/database.inc index 2aff55b87..74b9afcc9 100644 --- a/includes/database/pgsql/database.inc +++ b/includes/database/pgsql/database.inc @@ -40,6 +40,13 @@ class DatabaseConnection_pgsql extends DatabaseConnection { $dsn = 'pgsql:host=' . $connection_options['host'] . ' dbname=' . $connection_options['database'] . ' port=' . $connection_options['port']; parent::__construct($dsn, $connection_options['username'], $connection_options['password'], array( + // Prepared statements are most effective for performance when queries + // are recycled (used several times). However, if they are not re-used, + // prepared statements become ineffecient. Since most of Drupal's + // prepared queries are not re-used, it should be faster to emulate + // the preparation than to actually ready statements for re-use. If in + // doubt, reset to FALSE and measure performance. + PDO::ATTR_EMULATE_PREPARES => TRUE, // Convert numeric values to strings when fetching. PDO::ATTR_STRINGIFY_FETCHES => TRUE, // Force column names to lower case. |