Re: Postgres chooses slow query plan from time to time

2021-09-15 Thread Tom Lane
Kristjan Mustkivi writes: > On Wed, Sep 15, 2021 at 3:16 PM Tom Lane wrote: >> Note the lack of any visible cast on the varchar column, in each one of >> these queries, even where I tried to force one to appear. There is >> something happening in your database that is not happening in mine. > T

Re: Postgres chooses slow query plan from time to time

2021-09-15 Thread Kristjan Mustkivi
On Wed, Sep 15, 2021 at 3:16 PM Tom Lane wrote: > Note the lack of any visible cast on the varchar column, in each one of > these queries, even where I tried to force one to appear. There is > something happening in your database that is not happening in mine. > > My mind is now running to the p

Re: Postgres chooses slow query plan from time to time

2021-09-15 Thread Tom Lane
Kristjan Mustkivi writes: > Both are of type varchar(30). Ah, right, you showed that back at the top of the thread. > So is this something odd: Filter: (((product_code)::text = ($1)::text) > AND ((balance_type)::text = ($4)::text)) ? Yes, that is very darn odd. When I try this I get: regressi