From: Alexey Bashtanov <bashtanov@imap.cc>
To: Viktor Fougstedt <viktor@chalmers.se>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Incredibly slow queries on information_schema.constraint_column_usage?
Date: Mon, 5 Mar 2018 11:17:55 +0000
Message-ID: <ed17ca14-9087-e80d-9b3a-23d7234391c1@imap.cc> (raw)
In-Reply-To: <07365773-71E4-46A4-AA10-794094DB07D6@chalmers.se>
References: <07365773-71E4-46A4-AA10-794094DB07D6@chalmers.se>
Hello Viktor,
There was a known slowness issue in this view.
It was fixed in PG 10:
https://www.postgresql.org/message-id/flat/2d533e5b-687a-09fa-a772-dac9e6cf9dd4@imap.cc#2d533e5b-687...
You can try to use a solution from there to create a faster view that
returns the same data as information_schema.constraint_column_usage.
I wouldn't be surprised if it was safe to replace
information_schema.constraint_column_usage itself, but I cannot
guarantee it.
Best,
Alex
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: bashtanov@imap.cc, viktor@chalmers.se
Subject: Re: Incredibly slow queries on information_schema.constraint_column_usage?
In-Reply-To: <ed17ca14-9087-e80d-9b3a-23d7234391c1@imap.cc>
References: <07365773-71E4-46A4-AA10-794094DB07D6@chalmers.se> <ed17ca14-9087-e80d-9b3a-23d7234391c1@imap.cc>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox