Same query, same data different plan

2022-10-10 Thread Kostas Papadopoulos
ation, Postgresql version, schema and data are the same, what other factors is the planner considering? -- Kostas Papadopoulos KE MethodosIT

Re: Same query, same data different plan

2022-10-10 Thread Kostas Papadopoulos
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 <

Re: Same query, same data different plan

2022-10-10 Thread Kostas Papadopoulos
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/

Re: Same query, same data different plan

2022-10-10 Thread Kostas Papadopoulos
Hi, I cannot see how it can be configuration since the two databases are in the same Postgres instance. Kostas Papadopoulos On 10/10/2022 16:16, Pavel Stehule wrote: po 10. 10. 2022 v 15:12 odesílatel Julien Rouhaud napsal: On Mon, Oct 10, 2022 at 04:05:42PM +0300, Kostas Papadopoulos

Re: Same query, same data different plan

2022-10-10 Thread Kostas Papadopoulos
ould 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

Re: Same query, same data different plan

2022-10-10 Thread Kostas Papadopoulos
On 10/10/2022 17:53, Tom Lane wrote: Kostas Papadopoulos 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

Re: Same query, same data different plan

2022-10-10 Thread Kostas Papadopoulos
Hi Adrian, On 10/10/2022 20:59, Adrian Klaver wrote: Information needed: 1) The query and its EXPLAIN ANALYZE for both slow/fast cases. 2) Postgres version. 3) What database are the developers workstation pointing at? 4) What is the test db and is it the same as 3)? 5) What clients are yo