Re: [PATCH] Use optimized single-datum tuplesort in ExecSort - Mailing list pgsql-hackers

From David Rowley
Subject Re: [PATCH] Use optimized single-datum tuplesort in ExecSort
Date
Msg-id CAApHDvqhUYHYGmovoGWJQ1+Z+50Mz=PV6bW=QYEh3Z+wZTufPQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Use optimized single-datum tuplesort in ExecSort  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
On Tue, 20 Jul 2021 at 23:28, Ranier Vilela <ranier.vf@gmail.com> wrote:
> I took a look at cost_tuplesort and I think that some small adjustments could be made as part of the improvement
process.
> It is attached.
> 1. long is a very problematic type; better int64?
> 2. 1024 can be int, not long?
> 3. 2 changed all to 2.0 (double)?
> 4. If disk-based is not needed, IMO can we avoid calling relation_byte_size?
>
> Finally, to at least document (add comments) those conclusions,
> would be nice, wouldn't it?

I don't think there's anything useful here. If you think otherwise,
please take it to another thread.  Also, I'd recommend at least
compiling any patches you send to -hackers in the future. Going by the
CF bot, this one does not.

You might also want to read up on type promotion rules in C.  Your
sort_mem calculation change does not do what you think it does. Class
it as homework to figure out what's wrong with it.  No need to report
your findings here. Just thought it would be useful for you to learn
those things.

David



pgsql-hackers by date:

Previous
From: Yugo NAGATA
Date:
Subject: Re: Question about non-blocking mode in libpq
Next
From: Tom Lane
Date:
Subject: Re: Bitmap reuse