Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:> I found a slow query with large external sort. I expect, so external> sort should be penalized. Is it?
See cost_sort() in src/backend/optimizer/path/costsize.c
regards, tom lane