Welcome Guest, Not a member yet? Register   Sign In
Active record class VS simple query
#5

[eluser]BrianDHall[/eluser]
$this->db->get('my_table') is faster, because it is less typing and its hard to screw up the syntax.

There is of course a big difference in execution time/resources and development speed Smile

Always the word of caution, but it is likely the difference in speed is on the order of fractions of a millisecond - avoid using query strings directly just because they are 'faster', for the same reason you use CI even though just using a pure php spaghetti-coded page would be 'faster'.

Put if you have profiled your application and determined that AR functions are a significant constraining factor to application performance and a pseudo-test has been done to confirm you aren't wasting your time, then you should in fact drop built-in database objects entirely where possible and rely on direct system-specific optimized query calls - it might buy you more than a handful of clockcycles that ->query() vs ->get() could ever buy you. Still seems like a bit of a local optimization, but YMMV.


Messages In This Thread
Active record class VS simple query - by El Forum - 11-02-2009, 04:56 AM
Active record class VS simple query - by El Forum - 11-02-2009, 05:01 AM
Active record class VS simple query - by El Forum - 11-02-2009, 05:09 AM
Active record class VS simple query - by El Forum - 11-02-2009, 06:23 AM
Active record class VS simple query - by El Forum - 11-02-2009, 09:18 AM
Active record class VS simple query - by El Forum - 11-03-2009, 02:38 AM
Active record class VS simple query - by El Forum - 11-04-2009, 02:07 PM
Active record class VS simple query - by El Forum - 11-04-2009, 10:12 PM
Active record class VS simple query - by El Forum - 11-04-2009, 11:30 PM
Active record class VS simple query - by El Forum - 11-05-2009, 12:07 AM
Active record class VS simple query - by El Forum - 11-05-2009, 08:55 AM
Active record class VS simple query - by El Forum - 11-05-2009, 11:14 AM
Active record class VS simple query - by El Forum - 11-05-2009, 12:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB