https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20819
--- Comment #78 from Martin Renvoize <[email protected]> --- (In reply to Marcel de Rooy from comment #76) > (In reply to Martin Renvoize from comment #71) > > The ->next is chained onto the resultset inside the loop in C4::Auth whereas > > the resultset is created outside of the loop in your test. > Yeah deliberately. OK, I'm confused then.. what are you trying to prove here then? > > > I actually don't know which is faster, but I would imagine count is a bit > > faster and more memory efficient. > Thats the problem. I would expect something else. When doing it inside the loop as per my suggestion what you're actually doing is SELECT COUNT(*) FROM whatever WHERE whatever; Cache this answer and print it 100 times vs SELECT * FROM whatever WHERE whatever; Do this 100 times, hitting the database for each call of 'Next' to get the next result given an offset from the database. (Unless you call prefetch which says 'get me all rows in one go and cache them to iterate in memory) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
