On Fri, Jan 26, 2024 at 10:38 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > Sadly, that's not a small task: > > * We'd need to put effort into assigning more realistic procost > values --- preferably across the board, not just comparison functions. > As long as all the comparison functions have procost 1.0, you're > just flying blind. > > * As you mentioned, there'd need to be some accounting for the > likely size of varlena inputs, and especially whether they might > be toasted. > > * cost_sort knows nothing of the low-level sort algorithm improvements > we've made in recent years, such as abbreviated keys. > > That's a lot of work, and I think it has to be done before we try > to build infrastructure on top, not afterwards.
OK, that makes sense to me. Thanks. -- Robert Haas EDB: http://www.enterprisedb.com