> I would expect that Firebird only read 10 record, however it reads 10 + > 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/optimizer does know that. 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
