[PATCH] Make skipped sort explicit in EXPLAIN ANALYZE - Mailing list pgsql-hackers

From Marti Raudsepp
Subject [PATCH] Make skipped sort explicit in EXPLAIN ANALYZE
Date
Msg-id CABRT9RCaWa1mOj+7BjP_EMtLg86OX0oLtzJBZAHJvu5N6Ymo3Q@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Make skipped sort explicit in EXPLAIN ANALYZE
List pgsql-hackers
Hi,

This is just a small clarity improvement. tuplesort_performsort()
skips sorting entirely when the result set has 0 or 1 tuples, but
EXPLAIN still says it's using "quicksort". The patch changes that to
"skipped"

For example:

db=# explain analyze select * from now() order by 1;
 Sort  (cost=0.02..0.03 rows=1 width=8) (actual time=0.126..0.126
rows=1 loops=1)
   Sort Key: now
   Sort Method: skipped  Memory: 25kB
   ->  Function Scan on now  (cost=0.00..0.01 rows=1 width=8) (actual
time=0.032..0.033 rows=1 loops=1)

Patch attached.

Regards,
Marti

Attachment

pgsql-hackers by date:

Previous
From: Sergey Koposov
Date:
Subject: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile
Next
From: Tom Lane
Date:
Subject: Re: proclock table corrupted