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

[eluser]BrianDHall[/eluser]
[quote author="saidai jagan" date="1257422833"]Thanks fa u r reply !! Smile.
so shall i use query() rather than get()?.[/quote]

You should use whatever you prefer, in my opinion the relative performance is not of material interest - I'd disregard it completely.

I use ORM (DMZ), but when I didn't I preferred get() because I used select() and where() and all that.
#12

[eluser]ChazUK[/eluser]
What about for complex queries, say joining 2 tables together and limiting the amount of columns being displayed?

I think query should be faster after that.

And you should always be limitting the information you are grabbing from a db, SELECT * is the devil.
#13

[eluser]überfuzz[/eluser]
When it comes to db handling you could save a lot of time by structuring you tables properly. But even if you're not doing this there has to be quite a lot of data/rows to make it feel laggy for the user. I helped a dude to calculate some statistics, on genes. There you got an example of where structure and proper a query end up altering the execution time quite a lot.




Theme © iAndrew 2016 - Forum software by © MyBB