Re: Same query, same data different plan - Mailing list pgsql-general

From Kostas Papadopoulos
Subject Re: Same query, same data different plan
Date
Msg-id 37fcbc79-c9c9-979d-f7ad-43771e7923c5@methodosit.com.cy
Whole thread Raw
In response to Re: Same query, same data different plan  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Same query, same data different plan
List pgsql-general
On 10/10/2022 17:53, Tom Lane wrote:
> Kostas Papadopoulos <kostas@methodosit.com.cy> writes:
>> I cannot see how it can be configuration since the two databases are in the same
>> Postgres instance.
> 
> There is such a thing as ALTER DATABASE ... SET to install different
> settings at the per-database level.

I understand, but I created the databases to be the same. Our original problem was 
that developers' workstations (Debian and Windows) were running a specific query 
different from a test db (Ubuntu). After eliminating everything we thought of (data, 
versions, configurations, OS, etc) we ended up with the scenario I described here.
> 
> In general, the answer to your question is that the databases are
> *not* identical.  You just haven't figured out how yet.  I'm wondering
> if it has something to do with the dump/reload having compacted out
> bloat in the tables or indexes, causing cost estimates to change.

I will look into that and a couple of other ideas I got from this list.

> 
>             regards, tom lane

Thanks
kostas



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Same query, same data different plan
Next
From: Adrian Klaver
Date:
Subject: Re: Same query, same data different plan