> On 29 Oct 2023, at 21:30, Denis Smirnov wrote:
>
> I have taken a look at this discussion, at the code and I am confused how we
> choose tuple table slot (TTS) type in PG.
After offline discussion with Denis, we decided to withdraw this patch from CF
for now. If anyone is willing to revi
I have taken a look at this discussion, at the code and I am confused how we
choose tuple table slot (TTS) type in PG. May be you can clarify this topic or
me.
1. Brief intro. There are four types of TTS. Plan tree «leaves»:
- buffer heap (produced by index and table scans, has system columns a
On Fri, 27 Oct 2023 at 22:05, Ashutosh Bapat
wrote:
>
> On Fri, Oct 27, 2023 at 8:48 AM David Rowley wrote:
> > I was uncertain if the old behaviour of when srcslot contains fewer
> > attributes than dstslot was intended or not. What happens there is
> > that we'd leave the additional old dstslo
On Fri, Oct 27, 2023 at 8:48 AM David Rowley wrote:
>
> On Wed, 25 Oct 2023 at 22:48, Ashutosh Bapat
> wrote:
> > We may save the size of data in VirtualTupleTableSlot, thus avoiding
> > the first loop. I assume that when allocating
> > VirtualTupleTableSlot->data, we always know what size we are
On Wed, 25 Oct 2023 at 22:48, Ashutosh Bapat
wrote:
> We may save the size of data in VirtualTupleTableSlot, thus avoiding
> the first loop. I assume that when allocating
> VirtualTupleTableSlot->data, we always know what size we are
> allocating so it should be just a matter of saving it in
> Vir
On Tue, Oct 24, 2023 at 4:30 AM David Rowley wrote:
>
> On Fri, 20 Oct 2023 at 22:30, Ashutosh Bapat
> wrote:
> > I ran my experiments again. It seems on my machine the execution times
> > do vary a bit. I ran EXPLAIN ANALYZE on the query 5 times and took
> > average of execution times. I did thi
On Fri, 20 Oct 2023 at 22:30, Ashutosh Bapat
wrote:
> I ran my experiments again. It seems on my machine the execution times
> do vary a bit. I ran EXPLAIN ANALYZE on the query 5 times and took
> average of execution times. I did this three times. For each run the
> standard deviation was within 2
On Thu, Oct 19, 2023 at 4:26 PM David Rowley wrote:
>
> On Thu, 19 Oct 2023 at 22:29, David Rowley wrote:
> > It's hard to imagine why there would be a slowdown as this query uses
> > a TTSOpsMinimalTuple slot type in the patch and the unpatched version.
>
> I shrunk down your table sizes to 10k
On Thu, 19 Oct 2023 at 22:29, David Rowley wrote:
> It's hard to imagine why there would be a slowdown as this query uses
> a TTSOpsMinimalTuple slot type in the patch and the unpatched version.
I shrunk down your table sizes to 10k rows instead of 1 million rows
to reduce the CPU cache pressure
On Thu, 12 Oct 2023 at 23:06, Ashutosh Bapat
wrote:
> Q7 select distinct a,b from (select string_agg(left(a, 100), ', ')
> over (order by a rows 2 preceding) a, b from t_text) q
> HEAD: 16070.62 ms
> patched: 16182.16 ms
Did you time the SELECT or EXPLAIN ANALYZE?
With SELECT, I'm unable to recr
On Tue, Oct 10, 2023 at 2:23 PM David Rowley wrote:
>
> On Wed, 27 Sept 2023 at 20:01, David Rowley wrote:
> >
> > On Sat, 23 Sept 2023 at 03:15, Heikki Linnakangas wrote:
> > > So not a win in this case. Could you peek at the outer slot type, and
> > > use the same kind of slot for the Unique's
On Wed, 27 Sept 2023 at 20:01, David Rowley wrote:
>
> On Sat, 23 Sept 2023 at 03:15, Heikki Linnakangas wrote:
> > So not a win in this case. Could you peek at the outer slot type, and
> > use the same kind of slot for the Unique's result? Or some more
> > complicated logic, like use a virtual s
On Sat, 23 Sept 2023 at 03:15, Heikki Linnakangas wrote:
> So not a win in this case. Could you peek at the outer slot type, and
> use the same kind of slot for the Unique's result? Or some more
> complicated logic, like use a virtual slot if all the values are
> pass-by-val? I'd also like to keep
I did a little more perf testing with this. I'm seeing the same benefit
with the query you posted. But can we find a case where it's not
beneficial? If I understand correctly, when the input slot is a virtual
slot, it's cheaper to copy it to another virtual slot than to form a
minimal tuple. Li
Again the new patch hasn't been attached to the thread, so resend it.
v3-use-virtual-slots-for-unique-node.patch
Description: Binary data
I have made a small research and found out that though the patch itself is correct (i.e. we can benefit from replacing TTSOpsMinimalTuple with TTSOpsVirtual for the Unique node), my explanation WHY was wrong.1. We always materialize the new unique tuple in the slot, never mind what type of tuple ta
It looks like my patch was not analyzed by the hackers mailing list due to
incorrect mime type, so I duplicate it here.
commit 2852a3f2fab8e723f208d81c1ad1eb6a6a377b09
Author: Denis Smirnov
Date: Thu Aug 31 08:51:14 2023 +0700
Change tuple table slot for Unique node to "virtual"
T
On Thu, 31 Aug 2023 at 05:37, Денис Смирнов wrote:
> I have inspected the performance of the GROUP BY and DISTINCT queries for the
> sorted data streams and found out, that Group node (produced by GROUP BY)
> works faster then the Unique node (produced by DISTINCT). The flame graph
> should ou
18 matches
Mail list logo