Slow information_schema.views

Поиск
Список
Период
Сортировка
От Oliver Kohll - Mailing Lists
Тема Slow information_schema.views
Дата
Msg-id BD52F6EF-6CFB-4357-987C-145A2700BC97@gtwm.co.uk
обсуждение исходный текст
Ответы Re: Slow information_schema.views  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-general
Hello,

I'm doing some SELECTs from information_schema.views to find views with dependencies on other views, i.e.

SELECT table_name FROM information_schema.views WHERE view_definition ILIKE '%myviewname%';

and each is taking about 1/2 a second, which is getting a bit slow for my use. There are 1213 views listed in
information_schema.views

Doing an explain analyze, it looks like the issue is likely to be the pg_get_viewdef function or one of the privilege
checkfunctions. I'm not worried about privilege checks and I don't need a nicely formatted definition. Is there a way
offinding out how pg_get_viewdef works so I can perhaps do a lower level query? 

I've previously used pg_catalog.pg_views which performs similarly.

Or is there a better way of finding view dependencies? I see there's a pg_catalog entry for tables that a view depends
onbut that's not what I'm after. 

Regards
Oliver Kohll
www.agilebase.co.uk

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Conditionnal validation for transaction
Следующее
От: "Welty, Richard"
Дата:
Сообщение: current thinking on Amazon EC2?