Re: bug in information_schema?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kyle Bateman <kyle(at)actarg(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: bug in information_schema?
Date: 2005-07-30 15:15:12
Message-ID: 26942.1122736512@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Kyle Bateman <kyle(at)actarg(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dinesh Pandey 2005-08-01 05:31:13 How to connect ORACLE database from Postgres function using plpgsql/pltclu?
Previous Message Michael Fuhr 2005-07-30 13:15:05 Re: How to loop though an array plpgsql?