->row() without limit() causes high load |
i noticed that selecting row() without putting limit() in the active record is causing high load !!
anyone noticed that ?
Of course it will it's pulling in all the records matching your search.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(05-17-2018, 12:32 PM)khashabawy Wrote:(05-16-2018, 03:19 AM)InsiteFX Wrote: Of course it will it's pulling in all the records matching your search. 1. row return 1, but it does not limit the results from the database. 2. Add an index to the field. An index speed up the search.
(05-17-2018, 08:55 PM)Paradinight Wrote:(05-17-2018, 12:32 PM)khashabawy Wrote:(05-16-2018, 03:19 AM)InsiteFX Wrote: Of course it will it's pulling in all the records matching your search. Does not this considered a bug ? why does not row() limit to 1 row() ?
There is a reason for that.
Read the docs https://www.codeigniter.com/user_guide/d...sults.html (Result Rows)
|
Welcome Guest, Not a member yet? Register Sign In |