Re: [BUGS] BUG #14495: Cost of comparator is not taken into account in sorting

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #14495: Cost of comparator is not taken into account in sorting
Дата
Msg-id 5716.1484577812@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [BUGS] BUG #14495: Cost of comparator is not taken into account in sorting  (zszabo@chemaxon.com)
Список pgsql-bugs
zszabo@chemaxon.com writes:
> Our problem is that the cost of sorting by the Molecule column does not take
> into account the cost of the comparison by molecule_relevance_compare() at
> all!

Yeah, cost_sort just uses cpu_operator_cost as the estimated cost per
comparison.  It's unlikely anyone is going to be very excited about
changing that.  It would be quite expensive to look up a function-specific
cost on every call, and cost_sort is called often enough during planning
that that expense would be a problem.  Also, some call sites don't supply
enough information to do such a lookup at all; requiring them to provide
it would add more expense, and complication.  So I don't really see us
adding that much overhead to support such a corner case as an
unduly-expensive sort comparator.

            regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

В списке pgsql-bugs по дате отправления:

Предыдущее
От: nikolay.nikitin@infowatch.com
Дата:
Сообщение: [BUGS] BUG #14499: pg_dump error on the table with 512M or bigger byteavalues
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?