Re: [PERFORM] Slow queries from information schema

2009-02-14 Thread Octavio Alvarez
On Sat, 2009-02-14 at 15:02 -0500, Tom Lane wrote: > Octavio Alvarez writes: > > The result, on the above view: ~80ms. Fair enough. But if I apply a > > condition: > > SELECT * FROM ___pgnui_relation_tree.raw_relation_tree WHERE > > parent_schema <> child_schema; > > it takes ~2 seconds (!) to com

Re: [PERFORM] Slow queries from information schema

2009-02-14 Thread Tom Lane
Octavio Alvarez writes: > The result, on the above view: ~80ms. Fair enough. But if I apply a > condition: > SELECT * FROM ___pgnui_relation_tree.raw_relation_tree WHERE > parent_schema <> child_schema; > it takes ~2 seconds (!) to complete. I'm not sure I'm seeing the exact same case as you, but

[PERFORM] Slow queries from information schema

2009-02-14 Thread Octavio Alvarez
I'm aware you already know that information_schema is slow [1] [2], so I just want to expose/document another case and tests I did. I'm using the following view to check what tables depend on what other tables. CREATE VIEW raw_relation_tree AS SELECT tc_p.table_catalog AS parent_catalog, tc