LibreCat / Catmandu-DBI

A Catmandu::Store plugin for DBI based interfaces
Other
0 stars 1 forks source link

DBI iterator starts fast, but slows down afterwards #17

Closed nicolasfranck closed 7 years ago

nicolasfranck commented 7 years ago

The reason for this is the generator in Catmandu::Store::DBI::Iterator, that fetches the records in batches: for every batch a query is executed, using "order by id", "offset" and "limit". This means that the underlying dbi system has to jump further every time it is accessed.

Better to cache the cursor

nicolasfranck commented 7 years ago

https://github.com/LibreCat/Catmandu-DBI/pull/18

nics commented 7 years ago

merged in bb193400eae25d0778a47c08e0821230a4b47c59, released as 0.06