From: | Marti Raudsepp <marti(at)juffo(dot)org> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | [PATCH] Make skipped sort explicit in EXPLAIN ANALYZE |
Date: | 2012-05-25 13:30:01 |
Message-ID: | CABRT9RCaWa1mOj+7BjP_EMtLg86OX0oLtzJBZAHJvu5N6Ymo3Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
explain-sort-skipped.patch | application/octet-stream | 705 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-05-25 13:39:17 | Re: proclock table corrupted |
Previous Message | Sergey Koposov | 2012-05-25 13:18:04 | Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile |