Re: Same query, same data different plan

From: Kostas Papadopoulos <kostas(at)methodosit(dot)com(dot)cy>
To: Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Same query, same data different plan
Date: 2022-10-10 14:04:52
Message-ID: 1e6d39f6-a628-e266-25d1-41ef30c3e674@methodosit.com.cy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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.
>>
>>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-10-10 14:26:02 Re: Same query, same data different plan
Previous Message Ron 2022-10-10 13:44:00 Re: Same query, same data different plan