Re: bug in information_schema?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bug in information_schema?
Дата
Msg-id 26942.1122736512@sss.pgh.pa.us
обсуждение исходный текст
Ответ на bug in information_schema?  (Kyle Bateman <kyle@actarg.com>)
Ответы Re: bug in information_schema?  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-sql
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


В списке pgsql-sql по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: How to loop though an array plpgsql?
Следующее
От: "Dinesh Pandey"
Дата:
Сообщение: How to connect ORACLE database from Postgres function using plpgsql/pltclu?