Re: Incredibly slow queries on information_schema.constraint_column_usage?

From: Alexey Bashtanov <bashtanov(at)imap(dot)cc>
To: Viktor Fougstedt <viktor(at)chalmers(dot)se>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Incredibly slow queries on information_schema.constraint_column_usage?
Date: 2018-03-05 11:17:55
Message-ID: ed17ca14-9087-e80d-9b3a-23d7234391c1@imap.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)imap(dot)cc#2d533e5b-687a-09fa-a772-dac9e6cf9dd4@imap.cc
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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gunnar Halvorsen 2018-03-05 11:27:35 JDBC4 and setting statement_timeout: responds "is not yet implemented"
Previous Message Olleg Samoylov 2018-03-05 11:07:04 PostgreSQL 10.3 and Ubuntu