Chapter 14.1.1, small typo on costs?

Started by PG Bug reporting formover 5 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/using-explain.html
Description:

I am reading 14.1.1 and at the very end (just before 14.1.2) I see:

"which shows that the planner thinks that sorting onek by index-scanning is
about 12% more expensive than sequential-scan-and-sort."

I feel that 12% is incorrect, but I'm not quite sure. The costs are 268.19
and 292.65, and that's about 9% more expensive?

I'm not entirely sure though; just reading up on explain plans :)

With kind regards,
Jurrie

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: Chapter 14.1.1, small typo on costs?

PG Doc comments form <noreply@postgresql.org> writes:

I am reading 14.1.1 and at the very end (just before 14.1.2) I see:

"which shows that the planner thinks that sorting onek by index-scanning is
about 12% more expensive than sequential-scan-and-sort."

I feel that 12% is incorrect, but I'm not quite sure. The costs are 268.19
and 292.65, and that's about 9% more expensive?

No, the comparison this has in mind is 224.79 (the indexscan on onek
in the last plan) versus 200.33 (the sort on onek in the previous plan).
So 12% is about right.

regards, tom lane