Please visit [url removed, login to view] for the script. You will notice that it takes very long to load the main page and some category pages.
It's fully functioning, however recently I've had 2 new modifications added to the php codeigniter content management script:
- Add star rating on the category pages and main page
- Add sorting on main page
After these modifications were implemented the script now works VERY slow. I found out what the problem is, the queries that were used for the star rating on the category/main page and to sort just take too long to complete.
Here is an example of a query:
SELECT `g_added` AS dat, `g_id` AS id, `g_section` AS scn, `p_filename_thumb` AS img, `total_value`, `total_votes` FROM (`galleries`) JOIN `pictures` ON `pictures`.`p_g_id` = `galleries`.`g_id` LEFT JOIN `ratings` ON `ratings`.`id` = CONCAT('P', galleries.g_id) WHERE `g_enabled` = 1 GROUP BY `g_id` ORDER BY `g_added` DESC LIMIT 12;
This query takes over 30 seconds to complete.
I am looking for a programmer who can fix the slowdown on the script and make it work normal again.
I have attached two main script functions that is causing the problem for the main page ([url removed, login to view]). I still dont know what is causing the slowdown on the category pages.
Looking forward to any bids.