On 9/12/24 16:57, Tomas Vondra wrote:
On 9/12/24 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
Initial problem causes wrong cost_sort estimation. Right now I think
about providing cost_sort() the sort clauses instead of (or in addition
to) the pathkeys.
I'm
Hi,
Revising the patch I found out that it may make sense to teach
estimate_num_groups to process a PathKey node inside the presortedExprs
list.
In this case it can pass through the EquivalenceClass members and choose
correct number of distinct values.
Here is a sketch of the solution (see in
On 11/7/24 18:06, Alena Rybakina wrote:
On 07.11.2024 08:57, Andrei Lepikhov wrote:
That happens because when estimating the number of groups, Postgres
doesn't consider EquivalenceClass, which can let him correct group
estimation at a low price.
It may be done inside the make_pathkeys_for_sortc
Hi!
On 07.11.2024 08:57, Andrei Lepikhov wrote:
On 10/8/24 11:33, Andrei Lepikhov wrote:
On 9/23/24 20:02, Andrei Lepikhov wrote:
On 12/9/2024 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov
Minor change to make compiler and cfbot happy
Now, this thread looks conne
On 10/8/24 11:33, Andrei Lepikhov wrote:
On 9/23/24 20:02, Andrei Lepikhov wrote:
On 12/9/2024 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov
Minor change to make compiler and cfbot happy
Now, this thread looks connected to the [1]. However, it still has
independen
On 9/23/24 20:02, Andrei Lepikhov wrote:
On 12/9/2024 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
Initial problem causes wrong cost_sort estimation. Right now I think
about providing cost_sort() the sort clauses instead of (or in addition
to) the pathkeys.
On 12/9/2024 16:57, Tomas Vondra wrote:
On 9/12/24 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
but doesn't estimate_num_groups()
supposed to already do that? The comment says:
* 3. If the list contains Vars of different relations that are known equal
On 12/9/2024 16:57, Tomas Vondra wrote:
On 9/12/24 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
I'm not sure how to fix this, but it seems estimate_num_groups() needs
to do things differently. And I agree looking for the minimum ndistinct
seems like the righ
On 12/9/2024 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
Initial problem causes wrong cost_sort estimation. Right now I think
about providing cost_sort() the sort clauses instead of (or in addition
to) the pathkeys.
I'm not quite sure why the sort clauses
On 12/9/2024 12:12, David Rowley wrote:
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
Initial problem causes wrong cost_sort estimation. Right now I think
about providing cost_sort() the sort clauses instead of (or in addition
to) the pathkeys.
I'm not quite sure why the sort clauses
On 9/12/24 12:12, David Rowley wrote:
> On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
>> Initial problem causes wrong cost_sort estimation. Right now I think
>> about providing cost_sort() the sort clauses instead of (or in addition
>> to) the pathkeys.
>
> I'm not quite sure why the sort
On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote:
> Initial problem causes wrong cost_sort estimation. Right now I think
> about providing cost_sort() the sort clauses instead of (or in addition
> to) the pathkeys.
I'm not quite sure why the sort clauses matter any more than the
EquivalenceCl
On 12/9/2024 03:05, David Rowley wrote:
On Thu, 27 Jun 2024 at 03:00, Andrei Lepikhov wrote:
I tried to invent a simple solution to fight this minor case. But the
most clear and straightforward way here is to save a reference to the
expression that triggered the PathKey creation inside the Path
On Thu, 27 Jun 2024 at 03:00, Andrei Lepikhov wrote:
> I tried to invent a simple solution to fight this minor case. But the
> most clear and straightforward way here is to save a reference to the
> expression that triggered the PathKey creation inside the PathKey itself.
> See the sketch of the p
Hi,
While designing an improvement for the cost sort model, I discovered
that the query plan can vary if we slightly change the query text
without pushing semantic differences. See the example below:
CREATE TABLE test(x integer, y integer,z text);
INSERT INTO test (x,y) SELECT x, 1 FROM gener
15 matches
Mail list logo