when use order_by/group_by with join evrything slow |
[eluser]elbana[/eluser]
iam new with codeigniter i try to get data but evrything become slow Code: public function last_updates()
[eluser]CroNiX[/eluser]
If you run that query in straight sql, it would be just as slow because of all of the extra processing "group by" has to do. The main way to speed those up are to make sure those fields have an index. Anything you "sort by", "group by", use "where" on, etc should be indexed, especially on larger tables or tables that can grow large. Its also a lot faster to select individual fields than use select *. You should read up on db indexes. http://www.informit.com/articles/article.aspx?p=377652
[eluser]elbana[/eluser]
thanks , but what i have to change in my code after create the indexs
|
Welcome Guest, Not a member yet? Register Sign In |