Over the past few weeks I've been raging against an old Firebird database. This database is crappy for all sorts of reasons, but one thing I noticed was that every single field of every single table has two indexes; each one with a single segment, one in
asc order and one in
Apart from the wtf'ness of having an index for every field in every table, it got me thinking - is there any advantage for single-segment indexes to having two indexes with the same index segments, but one in
desc and one in
asc? Is there anything to be gained, or would a modern DBMS simple use the
asc index and start from the end and work its way backwards if required?