From: Jim S. <ja...@ne...> - 2005-06-04 11:26:45
|
Alex Kotov wrote: > > Problem a bit different and Dmitry already gave answer on it -- existing >versions of Firebird not optimally handle "greater than" and "less than" >index lookups - actually they performs "greater or equal" and "less or >equal" index lookup and eliminate "equal" rule at the end of query >execution. As a result with non-uniform key distribution we have performance >penalty like in the demonstrated case (i.e. process ~450030 records instead >of 30). > > > Since the alternative was reading the table exhaustively, those records would have been read anyway, so the worst case hit in your case was scanning more of the index than was necessary -- not exactly am earth shattering problem. |