DB doesn't have num_rows/numRows ?? |
(09-16-2018, 08:12 AM)skunkbad Wrote:(09-15-2018, 10:11 PM)Paradinight Wrote: See https://github.com/bcit-ci/CodeIgniter4/pull/109 We appreciate you leaving out the harsh rebuke's unless you have the data to back it up. The performance issues were being seen in CI3, and likely 2 also, but not in all database drivers. CI3 supported a vast amount of databases, and not all of them supported the features needed to do some of those, so the only way to issue a count of results was to pull them all out at once and count the resulting array, while other databases supported using a cursor so when you looped over results it was much faster and more memory-efficient. I don't recall which were which, and wasn't involved in CI development when those problems were found, so that's about as far as I can comment on that. As it stands at the moment, we only have 3 databases supported, so might re-visit that. But currently focused on just getting Alpha out the door. But as that diff pointed out - you can tell if you have results by checking the response itself. If you need to know the number of results exactly, grab the results and count the returned array. Simple. |
Welcome Guest, Not a member yet? Register Sign In |