pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants.

From: samhitha g <samhithagarudadri(at)gmail(dot)com>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants.
Date: 2020-05-07 17:10:55
Message-ID: CAG5FJBVFp4TtEde-xn2hpYQKByFxPQChXitrLorwyiN71+cPyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi experts,

Our application serves multiple tenants. Each tenant has the schema with a
few hundreds of tables and few functions.
We have 2000 clients so we have to create 2000 schemas in a single database.

While doing this, i observed that the catalog tables pg_attribute,
pg_class, pg_depend grow huge in count and size.

Do you think this will be a challenge during execution of every query ?

When Postgres parses an sql to find the best execution plan, does it scan
any of these catalogs that could eventually take more time?

Any other challenges you have come across or foresee in such cases ?

Thanks,
Sammy.

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Amarendra Konda 2020-05-07 17:36:02 Re: Explain plan changes - IN CLAUSE ( Passing direct values Vs INNER Query )
Previous Message David G. Johnston 2020-05-07 15:46:51 Re: Explain plan changes - IN CLAUSE ( Passing direct values Vs INNER Query )