Welcome Guest, Not a member yet? Register   Sign In
Migrating CI3 to CI4, need query->numRows function
#9

(01-01-2021, 03:14 AM)tgix Wrote:
(01-01-2021, 01:00 AM)adnzaki Wrote: Is it not enough for you?

I can only answer for myself. My take away is that getResult() loops the result set and reads in all the records. In CI3, num_rows() (at least for MySQL) queried mysqli_result::$num_rows and returned that without setting up the resulting records.

It doesn't just loop through the results, it instantiates an object for every single record. This is consuming a lot of memory and CPU cycles just to get some idea of how many records the query returned.
Reply


Messages In This Thread
RE: Migrating CI3 to CI4, need query->numRows function - by sneakyimp - 01-02-2021, 12:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB