Statement iterator implementation and cache fetched data.