I think there would be good to create an index on pg_class.relkind and pg_class.relnamespace, but its impossible since its a catalog table.
Any way to make it a default index (system index)?
Its an old PostgreSQL server:
SELECT version(); version ------------------------------------------------------------------------------------------------------------------------------ PostgreSQL 7.4.13 on x86_64-redhat-linux-gnu, compiled by GCC x86_64-redhat-linux-gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-2)