Use virtual tuple slot for Unique node - Mailing list pgsql-hackers

From Денис Смирнов
Subject Use virtual tuple slot for Unique node
Date
Msg-id 388BA879-CAEC-4930-A4EE-F06DC1F12C96@gmail.com
Whole thread Raw
Responses Re: Use virtual tuple slot for Unique node
List pgsql-hackers
Hi,

I have inspected the performance of the GROUP BY and DISTINCT queries for the sorted data streams and found out, that
Groupnode (produced by GROUP BY) works faster then the Unique node (produced by DISTINCT).  The flame graph should out
thereason - Unique palloc`s tuples for the result slot while the Group node doesn’t. 

I wonder, why do we use minimal tuples for the Unique node instead of the virtual ones? It looks like there is no
actualreason for that as Unique doesn’t make any materialization. 

Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: More new SQL/JSON item methods
Next
From: "Daniel Verite"
Date:
Subject: Re: EBCDIC sorting as a use case for ICU rules