ok so its not a big issue but all of the time we are loading extra information extra calls to join tables etc, - this is what is being called from the counter_cache, -
SELECT count(DISTINCT `players`.id) AS count_all FROM `players` LEFT OUTER JOIN `teams` ON `teams`.id = `players`.team_id LEFT OUTER JOIN `fieldpositions` ON `fieldpositions`.id = `players`.fieldposition_id LEFT OUTER JOIN `jobs` ON `jobs`.id = `players`.job_id LEFT OUTER JOIN `houses` ON `houses`.id = `players`.house_id ...........(+ another 32 related joined tables!!!!!!!!!) Ive cahnged the code but still somewhere this is being executed - record.send counter cache isnt working. Team Columns (0.8ms) SHOW FIELDS FROM `teams` Team Load (0.1ms) SELECT * FROM `teams` WHERE (`teams`.`id` IN (1,2)) Fieldposition Columns (0.4ms) SHOW FIELDS FROM `fieldpositions` Fieldposition Load (0.1ms) SELECT * FROM `fieldpositions` WHERE (`fieldpositions`.`id` IN (6,12,13,14,9,15,2,3)) Job Columns (0.6ms) SHOW FIELDS FROM `jobs` Job Load (0.1ms) SELECT * FROM `jobs` WHERE (`jobs`.`id` IN (6,12,8,13,14,1,3,4,5)) House Columns (0.5ms) SHOW FIELDS FROM `houses` House Load (0.1ms) SELECT * FROM `houses` WHERE (`houses`.`id` IN (7,12,8,14,9,15,1,2,4,10)) - can we cache this information? the table fields are being scanned alot repeatedly for the same information, surely rails does this somewhere? the next task is to get a page load under 1.5 seconds for a list view with 20 rows, its getting there from earlier but Iḿ left with 2 issues, the templating that rails provides - is reaaaaaaaly slow rewrelic shows me that the list template function (rails and AS) is the next performance issue, processing this costs the remaining 60% of the time, page loads are still about 1.5 secs for a tiny data set, I want to get to at least a 200 ms page load on a local host before I spend any more time developing as my game requires a fast response due to what I want to create!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
