Firebird Documentation IndexFirebird 2.1 Release Notes → Indexing & Optimizations
Firebird Home Firebird Home Prev: No Longer Reserved as KeywordsFirebird Documentation IndexUp: Firebird 2.1 Release NotesNext: Improved PLAN Clause

Indexing & Optimizations

Table of Contents

Optimizations in V.2.1
Improved PLAN Clause
Optimizer Improvements
Enhancements to Indexing

Optimizations in V.2.1

Optimization improvements in v.2.1 include:

(v.2.1) Economising on Indexed Reads for MIN() and MAX()

Indexed MIN/MAX aggregates would produce three indexed reads instead of the expected single read. So, with an ASC index on the non-nullable COL, the query

  SELECT MIN(COL) FROM TAB
          

should be completely equivalent, to

  SELECT FIRST 1 COL FROM TAB
  ORDER BY 1 ASC
          

with both performing a single record read. However, formerly, the first query required three indexed reads while the second one required just the expected single read. Now, they both resolve to a single read.

The same optimization applies to the MAX() function when mapped to a DESC index.

Prev: No Longer Reserved as KeywordsFirebird Documentation IndexUp: Firebird 2.1 Release NotesNext: Improved PLAN Clause
Firebird Documentation IndexFirebird 2.1 Release Notes → Indexing & Optimizations