On Tue, Feb 18, 2025 at 2:52 PM Andrei Lepikhov wrote:
> On 17/2/2025 02:06, Alexander Korotkov wrote:
> > On Thu, Nov 28, 2024 at 4:39 AM Andrei Lepikhov wrote:
> >> Here we also could count number of scanned NULLs separately in
> >> vardata_extra and use it in upper GROUP-BY estimation.
> >
> >
Hi, Vlada.
On Tue, Feb 18, 2025 at 6:56 PM Vlada Pogozhelskaya
wrote:
> Following the discussion on improving statistics estimation by considering
> GROUP BY as a unique constraint, I’ve prepared a patch that integrates GROUP
> BY into cardinality estimation in a similar way to DISTINCT.
>
> Th
Hi all,
Following the discussion on improving statistics estimation by
considering GROUP BY as a unique constraint, I’ve prepared a patch that
integrates GROUP BY into cardinality estimation in a similar way to
DISTINCT.
This patch ensures that when a subquery contains a GROUP BY clause, the
On 17/2/2025 02:06, Alexander Korotkov wrote:
On Thu, Nov 28, 2024 at 4:39 AM Andrei Lepikhov wrote:
Here we also could count number of scanned NULLs separately in
vardata_extra and use it in upper GROUP-BY estimation.
What could be the type of vardata_extra? And what information could
it st
On Thu, Nov 28, 2024 at 4:39 AM Andrei Lepikhov wrote:
> Thanks to take a look!
>
> On 11/25/24 23:45, Heikki Linnakangas wrote:
> > On 24/09/2024 08:08, Andrei Lepikhov wrote:
> >> + * proves the var is unique for this query. However, we'd better
> >> still
> >> + * believe the null-frac
Thanks to take a look!
On 11/25/24 23:45, Heikki Linnakangas wrote:
On 24/09/2024 08:08, Andrei Lepikhov wrote:
+ * proves the var is unique for this query. However, we'd better
still
+ * believe the null-fraction statistic.
*/
if (vardata->isunique)
stadistinct =
On 24/09/2024 08:08, Andrei Lepikhov wrote:
On 19/9/2024 09:55, Andrei Lepikhov wrote:
This wrong prediction makes things much worse if the query has more
upper query blocks.
His question was: Why not consider the grouping column unique in the
upper query block? It could improve estimations.
Af
22b572903b8c1a2459b051f91e0902a2fc243648 Mon Sep 17 00:00:00 2001
From: "Andrei V. Lepikhov"
Date: Wed, 18 Sep 2024 19:25:02 +0200
Subject: [PATCH v2] Improve statistics estimation considering GROUP-BY as a
'uniqueiser'.
This commit follows the idea of the 4767bc8ff2. GROUP-BY make
V. Lepikhov"
Date: Wed, 18 Sep 2024 19:25:02 +0200
Subject: [PATCH] Improve statistics estimation considering GROUP-BY as a
'uniqueiser'.
This commit follows the idea of the 4767bc8ff2. GROUP-BY makes the grouped
column 'highly likely unique'. We can employ this fact in