FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


"order by" in sql or sort() in php





tazone
"order by" in sql
or
sort() in php

which of the two would give the lowest CPU usage?
silverdown
Its not the function or the way you sort information that depends on the CPU usage is more of how much data your sorting how long it will take and how much CPU usage it will need. The more data, the longer it may take, the less data the faster.

This is what I experienced when use both of those methods.
tazone
so there is no difference in these methods according to you?
(for the same amount of data)
Bondings
I would definitely do it in MySQL, but make sure that the columns you sort have an index.
therimalaya
Me too, I also prefer ORDER BY in Mysql...
Related topics
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.