From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyle Bateman <kyle@actarg.com>
Cc: pgsql-sql@postgresql.org, Peter Eisentraut <peter_e@gmx.net>
Subject: Re: bug in information_schema?
Date: Sat, 30 Jul 2005 11:15:12 -0400
Message-ID: <26942.1122736512@sss.pgh.pa.us> (raw)
In-Reply-To: <42EB0700.4040600@actarg.com>
References: <42EB0700.4040600@actarg.com>
Kyle Bateman <kyle@actarg.com> writes:
> I noticed that it seemed a bit slow to query
> information_schema.view_column_usage. As I look at the code in
> information_schema.sql, I'm not sure why pg_user is referenced twice
> (once without an alias). It looks like we can take out the first
> pg_user and remove the DISTINCT keyword and this improves the efficiency
> significantly.
The unconstrained join against pg_user is clearly unnecessary,
and in fact I took it out a few days ago. I'm not sure whether the
SELECT DISTINCT is still needed --- it might be, if there can be
multiple pg_depend entries linking the same entities.
Peter, any thoughts?
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, kyle@actarg.com, peter_e@gmx.net
Subject: Re: bug in information_schema?
In-Reply-To: <26942.1122736512@sss.pgh.pa.us>
* 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