Re: Same query, same data different plan

From: Kostas Papadopoulos <kostas(at)methodosit(dot)com(dot)cy>
To: Daevor The Devoted <dollien(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Same query, same data different plan
Date: 2022-10-10 13:05:42
Message-ID: 8da58bc7-a01a-0168-3d49-062258ac82ec@methodosit.com.cy
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Yes, I ran ANALYZE in both databases.

Kostas

On 10/10/2022 16:03, Daevor The Devoted wrote:
> Hi
>
> Is the table stats up to date on both?
>
> https://www.postgresql.org/docs/current/planner-stats.html
>
> Best regards,
> Na-iem Dollie
>
> On Mon, Oct 10, 2022 at 2:56 PM Kostas Papadopoulos <
> kostas(at)methodosit(dot)com(dot)cy> wrote:
>
>>
>> I have two identical databases running in the same instance of Postgresql.
>> Ran
>> analyze on both. Running the same query I'm getting different plans, one
>> x10 slower.
>> Although I have solved my problem by re-writing the query, I want to
>> understand why
>> this is happening. If the configuration, Postgresql version, schema and
>> data are the
>> same, what other factors is the planner considering?
>>
>> --
>>
>> Kostas Papadopoulos
>> KE MethodosIT
>>
>>
>>
>>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Julien Rouhaud 2022-10-10 13:12:17 Re: Same query, same data different plan
Previous Message Daevor The Devoted 2022-10-10 13:03:20 Re: Same query, same data different plan