Subject SV: [firebird-support] Re: null field and order by
Author svanderclock
--- In > I think (i.e. I'm not sure, so test things rather than just >believe what I write to be true) that an index for sorting would >only be benefitial for returning the first rows and that when >returning the entire result set it is slower than using NATURAL.

yes, but we want only the first row :)


> If you want an index to be used for sorting, have you tried creating an expression index with NULLS LAST? I kind of see an index ordered with NULLS LAST as different from NULLS FIRST and that different indexes would have to be used. Does it still avoid using the index?

not really understand what you mean? for now i use a simple solution that consist to add a condition > xxx to remove the null row from the result... work ok