Re: Multitenancy optimization

2019-03-29 Thread Konstantin Knizhnik
On 29.03.2019 11:06, Hadi Moshayedi wrote: On Thu, Mar 28, 2019 at 5:40 AM Konstantin Knizhnik mailto:k.knizh...@postgrespro.ru>> wrote: Certainly it is possible to create multicolumn statistics to notify Postgres about columns correlation. But unfortunately it is not good and wor

Re: Multitenancy optimization

2019-03-29 Thread Hadi Moshayedi
On Thu, Mar 28, 2019 at 5:40 AM Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > Certainly it is possible to create multicolumn statistics to notify > Postgres about columns correlation. > But unfortunately it is not good and working solution. > > First of all we have to create multicolum

Multitenancy optimization

2019-03-28 Thread Konstantin Knizhnik
Hi hacker, Postgres is quite frequently used in different Internet services with multi-tenant architecture. It means that all object stored in the database have something like "tenant_id" foreign key. This key is used in all queries, i.e. select * from Product where tenant_id=? and produ