Re: [GENERAL] Slow information_schema.views

2012-03-22 Thread Oliver Kohll - Mailing Lists
On 22 Mar 2012, at 10:17, Albe Laurenz wrote: >> Or is there a better way of finding view dependencies? I see there's a > pg_catalog entry for tables >> that a view depends on but that's not what I'm after. > > You can use pg_depend and pg_rewrite as follows: > > SELECT DISTINCT r.ev_class::reg

Re: [GENERAL] Slow information_schema.views

2012-03-22 Thread Albe Laurenz
Oliver Kohll - Mailing Lists wrote: > 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 get