pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kostas Papadopoulos <kostas@methodosit.com.cy>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Same query, same data different plan
Date: Mon, 10 Oct 2022 17:04:52 +0300
Message-ID: <1e6d39f6-a628-e266-25d1-41ef30c3e674@methodosit.com.cy> (raw)
In-Reply-To: <370be1df-d840-d08c-0cbb-27b4b33a0e1c@gmail.com>
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>
	<bcd2392a-eb2c-9a4c-9bdc-765a4045955b@methodosit.com.cy>
	<370be1df-d840-d08c-0cbb-27b4b33a0e1c@gmail.com>


On 10/10/2022 16:44, Ron wrote:
> How identical is "identical"?
> 
> For example, does diff says that "pg_dump --schema-only" of DB1 and DB2 are perfectly 
> identical?
> 
> And are the table counts identical?

I created the second database using pg_dump from the first, so they should be exactly 
the same.

> 
> On 10/10/22 08:15, Kostas Papadopoulos wrote:
>> Hi,
>>
>> Thank you for responding. My question is not about the performance of a specific 
>> query. As I wrote, that is already solved.
>>
>> My question is "how can it be that the same query run in two exactly the same 
>> databases can have different plans."
>>
>>
>> Kostas Papadopoulos
>>
>> On 10/10/2022 16:12, Julien Rouhaud wrote:
>>> On Mon, Oct 10, 2022 at 04:05:42PM +0300, Kostas Papadopoulos wrote:
>>>> Hi,
>>>>
>>>> Yes, I ran ANALYZE in both databases.
>>>
>>> Please look at https://wiki.postgresql.org/wiki/Slow_Query_Questions to provide
>>> more information.
>>
>>
> 





view thread (15+ messages)  latest in thread

Message-ID: <1e6d39f6-a628-e266-25d1-41ef30c3e674@methodosit.com.cy>
Permalink:  ../1e6d39f6-a628-e266-25d1-41ef30c3e674@methodosit.com.cy/
Also on:    postgresql.org/message-id/1e6d39f6-a628-e266-25d1-41ef30c3e674@methodosit.com.cy

 · 

reply

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, ronljohnsonjr@gmail.com
  Subject: Re: Same query, same data different plan
  In-Reply-To: <1e6d39f6-a628-e266-25d1-41ef30c3e674@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> <bcd2392a-eb2c-9a4c-9bdc-765a4045955b@methodosit.com.cy> <370be1df-d840-d08c-0cbb-27b4b33a0e1c@gmail.com> <1e6d39f6-a628-e266-25d1-41ef30c3e674@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