public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Attila Soki <[email protected]>
Cc: [email protected]
Subject: Re: unstable query plan on pg 16,17,18
Date: Mon, 23 Feb 2026 22:44:00 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Mon, 2026-02-23 at 22:19 +0100, Attila Soki wrote:
> To "switch" between the ok and wrong plans I execute
> vacuumdb -Upostgres -vZ -t schema1.table_k db1
> multiple times (1x-3x) until the plan flips. So I thought the table should already have been analyzed.
> In my first email I called table_k as the "tbl_used_in_query"
Ok, I see. Then a simple ANALYZE won't do.
Perhaps the column needs more detailed statistics?
ALTER TABLE schema1.table_k ALTER dp_end_dat SET STATISTICS 1000;
ANALYZE schema1.table_k (dp_end_dat);
> or have I misunderstood that with the analyze?
No; I missed that point.
Yours,
Laurenz Albe
view thread (25+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: unstable query plan on pg 16,17,18
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox