|Subject||From where Firebird get field values in ORDER BY if DISTINCT is applied|
query like this
SELECT DISTINCT T.FIELD_1 FROM TEST T ORDER By T.FIELD_2, T.FIELD_1
from where Firebird get info about T.FIELD_2 in order by if it applied first DISTINCT (unique sort)?
i run this also on FB3 to get more info from explained plan
-> Sort (record length: 32, key length: 16)
-> Unique Sort (record length: 32, key length: 8)
-> Table "TEST " as "T" Full Scan
Is this a bug? Because first FB sort unique results and got only unique values of FIELD_1 and it can not know what value is in FIELD_2 after unique sort.