Em ter., 27 de ago. de 2024 às 00:43, Richard Guo
escreveu:
> On Thu, Aug 22, 2024 at 9:02 PM Ranier Vilela wrote:
> > Em qui., 22 de ago. de 2024 às 04:34, Richard Guo <
> guofengli...@gmail.com> escreveu:
> >> This does not seem right to me, as PathTargets are not canonical, so
> >> we cannot
On Thu, Aug 22, 2024 at 9:02 PM Ranier Vilela wrote:
> Em qui., 22 de ago. de 2024 às 04:34, Richard Guo
> escreveu:
>> This does not seem right to me, as PathTargets are not canonical, so
>> we cannot guarantee that two identical PathTargets will have the same
>> pointer. Actually, for the que
On Mon, Aug 26, 2024 at 8:58 PM Peter Eisentraut wrote:
> On 23.08.24 10:27, Richard Guo wrote:
> > Fair point. After looking at the code for a while, I believe it is
> > sufficient to compare PathTarget.exprs after we've checked that the
> > two targets have different pointers.
>
> -
On 23.08.24 10:27, Richard Guo wrote:
On Fri, Aug 23, 2024 at 11:56 AM Tom Lane wrote:
Richard Guo writes:
I agree that it’s always desirable to postpone work from path-creation
time to plan-creation time. In this case, however, it’s a little
different. The projection step could actually be
Hi Rafia.
Em qui., 22 de ago. de 2024 às 17:17, Rafia Sabih
escreveu:
>
>
> On Thu, 22 Aug 2024 at 15:02, Ranier Vilela wrote:
>
>> Hi.
>>
>> Em qui., 22 de ago. de 2024 às 04:34, Richard Guo
>> escreveu:
>>
>>> I ran into a query plan where the Result node seems redundant to me:
>>>
>>> creat
On Fri, Aug 23, 2024 at 11:56 AM Tom Lane wrote:
> Richard Guo writes:
> > I agree that it’s always desirable to postpone work from path-creation
> > time to plan-creation time. In this case, however, it’s a little
> > different. The projection step could actually be avoided from the
> > start
Richard Guo writes:
> On Fri, Aug 23, 2024 at 11:19 AM Tom Lane wrote:
>> I'm not sure you're considering "efficiency" in the right light.
> I agree that it’s always desirable to postpone work from path-creation
> time to plan-creation time. In this case, however, it’s a little
> different. Th
On Fri, Aug 23, 2024 at 11:19 AM Tom Lane wrote:
> Richard Guo writes:
> > ... we'll always make a separate ProjectionPath on top of the SortPath
> > in create_ordered_paths. It’s only when we create the plan node for
> > the projection step in createplan.c that we realize a separate Result
> >
Richard Guo writes:
> ... we'll always make a separate ProjectionPath on top of the SortPath
> in create_ordered_paths. It’s only when we create the plan node for
> the projection step in createplan.c that we realize a separate Result
> is unnecessary. This is not efficient.
I'm not sure you're
On Thu, Aug 22, 2024 at 3:34 PM Richard Guo wrote:
> /* Add projection step if needed */
> if (sorted_path->pathtarget != target)
> sorted_path = apply_projection_to_path(root, ordered_rel,
>sorted_path, target);
>
> This does not see
On Thu, Aug 22, 2024 at 8:03 PM David Rowley wrote:
> On Thu, 22 Aug 2024 at 23:33, Peter Eisentraut wrote:
> > > I wonder if we need to invent a function to compare two PathTargets.
> >
> > Wouldn't the normal node equal() work?
>
> It might. I think has_volatile_expr might be missing a
> pg_nod
On Thu, 22 Aug 2024 at 15:02, Ranier Vilela wrote:
> Hi.
>
> Em qui., 22 de ago. de 2024 às 04:34, Richard Guo
> escreveu:
>
>> I ran into a query plan where the Result node seems redundant to me:
>>
>> create table t (a int, b int, c int);
>> insert into t select i%10, i%10, i%10 from generate_
Hi.
Em qui., 22 de ago. de 2024 às 04:34, Richard Guo
escreveu:
> I ran into a query plan where the Result node seems redundant to me:
>
> create table t (a int, b int, c int);
> insert into t select i%10, i%10, i%10 from generate_series(1,100)i;
> create index on t (a, b);
> analyze t;
>
> set
On Thu, 22 Aug 2024 at 23:33, Peter Eisentraut wrote:
> > I wonder if we need to invent a function to compare two PathTargets.
>
> Wouldn't the normal node equal() work?
It might. I think has_volatile_expr might be missing a
pg_node_attr(equal_ignore).
David
On 22.08.24 09:34, Richard Guo wrote:
I looked into this a little bit and found that in function
create_ordered_paths, we decide whether a projection step is needed
based on a simple pointer comparison between sorted_path->pathtarget
and final_target.
/* Add projection step if needed */
On Thu, 22 Aug 2024 at 19:34, Richard Guo wrote:
> /* Add projection step if needed */
> if (sorted_path->pathtarget != target)
> sorted_path = apply_projection_to_path(root, ordered_rel,
>sorted_path, target);
>
> This does not seem
16 matches
Mail list logo