On 2019-09-18 06:46, liviuslivius liviusliv...@poczta.onet.pl 
[firebird-support] wrote:
> Hi
> 
> your problem is that you have ascending index, which is not usable in
> descending queries. You need to create descending index and it then
> can be used in e.g. max queries. Ascending index is used in min
> queries and order by xx asc.

This is in my opinion an annoying limitation of Firebird. The indexes 
are theoretically bidirectional, but aren't used that way because of how 
index pages are written. The write strategy makes it possible for a 
reverse read to miss index pages when the index is modified (page split) 
while it is read. I think there must be a strategy that can be used to 
address that.

In other database an 'ascending' index can also be used for descending 
reads, there ascending and descending are applied to individual columns 
to create different key orderings in the index.

Mark
  • [firebird... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
    • RE: ... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
      • ... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
    • Re: ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
    • RE: ... liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
      • ... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
      • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
        • ... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
        • ... 'P-Soft - Fabio Codebue' f.code...@p-soft.biz [firebird-support]
          • ... Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
            • ... 'P-Soft - Fabio Codebue' f.code...@p-soft.biz [firebird-support]
            • ... Rustam rusta...@ukr.net [firebird-support]
              • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
              • ... Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
        • ... Mikkel Andersen mik...@cito.dk [firebird-support]

Reply via email to