Re: [GENERAL] pg_relation_size performance issue

2015-06-04 Thread Hans Guijt
Thanks, this is most helpful. I originally found that query somewhere on the internet and used it as-is. If I drop the restriction on table name I get a list that also includes indexes, constraints, etc. Is there a way to restrict the returned set to tables only? Hans Guijt From: Melvin

Re: [GENERAL] pg_relation_size performance issue

2015-06-04 Thread Hans Guijt
...and I forgot to add: for the rest the database is behaving fine; everything else works without performance issues, even when we stepped up the amount of data somewhat. It's just this one query that is somehow very slow. Hans Guijt From: pgsql-general-ow...@postgresql.org [mailto:

[GENERAL] pg_relation_size performance issue

2015-06-04 Thread Hans Guijt
text)" " SubPlan 1" "-> Aggregate (cost=9.49..9.50 rows=1 width=4)" " -> Index Scan using pg_index_indrelid_index on pg_index (cost=0.27..9.48 rows=2 width=4)" "Index Cond: (indrelid = cl.reltoastrelid)" " SubPlan 2" "-> Aggregate (cost=9.49..9.50 rows=1 width=4)" " -> Index Scan using pg_index_indrelid_index on pg_index pg_index_1 (cost=0.27..9.48 rows=2 width=4)" "Index Cond: (indrelid = c.oid)" Is there a way to improve execution time of what should be a fairly trivial query? What am I doing wrong? Hans Guijt