Re: Bad Estimate for multi tenant database queries - Mailing list pgsql-general

From Michael Lewis
Subject Re: Bad Estimate for multi tenant database queries
Date
Msg-id CAHOFxGoUNnvKAdnwjMmesLu+RkoMBtkDn+LiPrfewSYP40KCSw@mail.gmail.com
Whole thread Raw
In response to Bad Estimate for multi tenant database queries  (Peter Grman <peter.grman@gmail.com>)
Responses Re: Bad Estimate for multi tenant database queries
List pgsql-general
CREATE STATISTICS MT_ReservationDepartureUtc (ndistinct) on "AccountCode", "DepartureUtc" from "Reservation"."Reservation";
CREATE STATISTICS MT_ReservationArrivalUtc (ndistinct) on "AccountCode", "ArrivalUtc" from "Reservation"."Reservation";
CREATE STATISTICS MT_ReservationNoShowFeeId (ndistinct) on "AccountCode", "NoShowFeeId" from "Reservation"."Reservation";
CREATE STATISTICS MT_ReservationTimeSliceDefinitionId (ndistinct) on "AccountCode", "TimeSliceDefinitionId" from "Reservation"."Reservation";

but that didn't help either

Did you try with 'dependencies' for the statistics_kind or only ndistinct? What was default_statistics_target set to at the time you created the extended statistics? I am not sure if that value is used, but I would assume so.

pgsql-general by date:

Previous
From: Nagendra Bandi
Date:
Subject: Re: Postgres HA issue - Standby server does not start after Mastercompute host is shut down
Next
From: Michael Lewis
Date:
Subject: Re: literal vs dynamic partition constraint in plan execution