From: Kostas Papadopoulos <kostas@methodosit.com.cy>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Daevor The Devoted <dollien@gmail.com>
Cc: pgsql-general@lists.postgresql.org, Julien Rouhaud <rjuju123@gmail.com>
Subject: Re: Same query, same data different plan
Date: Mon, 10 Oct 2022 18:12:11 +0300
Message-ID: <37fcbc79-c9c9-979d-f7ad-43771e7923c5@methodosit.com.cy> (raw)
In-Reply-To: <4073393.1665413623@sss.pgh.pa.us>
References: <20b3e283-3107-cd18-6e7f-90ed58e7ddf8@methodosit.com.cy>
<CAAZnbVoCXD0d6AKDjoEUD2NXzH1KugMUGy69Whs0_tfH-LPXcw@mail.gmail.com>
<8da58bc7-a01a-0168-3d49-062258ac82ec@methodosit.com.cy>
<20221010131217.7kzur6b63cl2we7y@jrouhaud>
<CAFj8pRDrXx3Vn4tosO=QO_LgpRu9MnrnPsz8dfDJpL2z51StiA@mail.gmail.com>
<a4258205-3105-7709-04f4-0ce82012578f@methodosit.com.cy>
<4073393.1665413623@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: kostas@methodosit.com.cy, tgl@sss.pgh.pa.us, pavel.stehule@gmail.com, dollien@gmail.com, rjuju123@gmail.com
Subject: Re: Same query, same data different plan
In-Reply-To: <37fcbc79-c9c9-979d-f7ad-43771e7923c5@methodosit.com.cy>
References: <20b3e283-3107-cd18-6e7f-90ed58e7ddf8@methodosit.com.cy> <CAAZnbVoCXD0d6AKDjoEUD2NXzH1KugMUGy69Whs0_tfH-LPXcw@mail.gmail.com> <8da58bc7-a01a-0168-3d49-062258ac82ec@methodosit.com.cy> <20221010131217.7kzur6b63cl2we7y@jrouhaud> <CAFj8pRDrXx3Vn4tosO=QO_LgpRu9MnrnPsz8dfDJpL2z51StiA@mail.gmail.com> <a4258205-3105-7709-04f4-0ce82012578f@methodosit.com.cy> <4073393.1665413623@sss.pgh.pa.us> <37fcbc79-c9c9-979d-f7ad-43771e7923c5@methodosit.com.cy>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox