[eluser]BrianDHall[/eluser]
[quote author="saidai jagan" date="1257259099"]OH. FYI i checked both (get() and query()) methods in the output profiler system.It shows get() is much better than query() :-S .Any information ???[/quote]
I ran some tests on my live server and tested three things:
1- ORM approach (create an object and use get).
2- db->query()
3- db->get()
I found get to be the fastest, query to be .002-.005 seconds slower, and the orm method to be .007 slower.
So the difference in the slowest and the fastest require about 35 queries to cause even a quarter of a second of difference in performance.
Seems kind of a minor difference, but dunno why get() actually runs ever so slightly faster.
For fun I tested $i++ vs ++$i, just cause, and it takes 100,000 uses to score .005 seconds of difference in performance. For those keeping track, that is 5,000,000 increments to be a quarter of a second of difference