Subject sort table depending on the select list instead of depending on the order-by key
Author woodsmailbox
A huge sort table gets created (and lousy performance) depending on
what I put in the select list, not what I put in the order-by clause.
SORT is the root of the plan, but why does it include other columns
that are not included in the order-by clause in it? I'd wish it would
choose to retrieve the other values _after_ the SORT. Currently, I
trick the optimizer by creating a view on top, but this trick might
not work in a future version of firebird and I'll be back where I
started.

Btw, in fb 2.1.2 or 2.5, does the optimizer try to inline stacked
views (views that select from views)?