Subject | RE: [firebird-support] Reading unnecessary records |
---|---|
Author | Leyne, Sean |
Post date | 2014-04-04T17:15:27Z |
> I would expect that Firebird only read 10 record, however it reads 10 +The engine/optimizer does know that.
> 10x20 = 210 records.
> > In theory the optimizer could know that City.ID and Hobby.ID are both
> primary keys (or unique) and therefore only scan PersonTable.
The engine, however, must check whether the matching key does exist, which requires reading the index structures. -- which raises a READ or FETCH operation!
So, a count of 210 is not unreasonable.
Sean