Hello Michael,
I digged a bit deeper and found an even simpler query, which can perfectly
embody that problem:
explain (ANALYZE, FORMAT text)
select *
from "Reservation"."Reservation" r
join "Rates"."TimeSliceDefinition" t on r."TimeSliceDefinitionId" = t."Id"
where r."AccountCode" = 'OXHV' and t
Hello,
I've noticed that we our queries have very bad estimates, which leads to
the planner using slow nested loops, here is a subset of the query without
tenant separation (correct estimates):
explain (ANALYZE, COSTS, BUFFERS, FORMAT text)
select *
from "Reservation"."Reservation" r
thing different,
or?
Thx for taking your time!
On Fri, Aug 16, 2019 at 3:44 PM Tom Lane wrote:
> Peter Grman writes:
> > our ORM with tenant separation enabled is creating the following query:
>
> Ugh.
>
> By my count there are nine joined tables in that query, which means
&g