pgsql: Optimize query for information_schema.constraint_column_usage

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Optimize query for information_schema.constraint_column_usage
Date: 2017-02-18 00:35:37
Message-ID: E1ceszx-000275-Ra@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Optimize query for information_schema.constraint_column_usage

The way the old query was written prevented some join optimizations
because the join conditions were hidden inside a CASE expression. With
a large number of constraints, the query became unreasonably slow. The
new query performs much better.

From: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
Reviewed-by: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e3a58c8835a2cd428b8534dd8df30a7cb96c976b

Modified Files
--------------
src/backend/catalog/information_schema.sql | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2017-02-18 12:49:56 pgsql: Fix help message for pg_basebackup -R
Previous Message Peter Eisentraut 2017-02-18 00:00:16 pgsql: doc: Fix typos