Marcus J. Ertl schrieb: Hi again! > I'm afraid, this is poor application design on my side too. :-((((( > OK, I took a look into this! It was bad design on my side! :-(
I've startet with more then 60 queries, taking about 30 seconds! :-(
After taking the check outside the loop, I'm down to 24 queries, taking
about 10 seconds.
Adding indexes to the acos- and aros-tables brought down the time for
this queries to about 2 seconds!
A closer look shows, it's allways the same query taking to long:
*23. Affected: 36 Num. rows: 36 Took: 502ms*
SELECT `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`,
`Aco`.`foreign_key`, `Aco`.`alias` FROM `acos` AS `Aco` LEFT JOIN
`acos` AS `Aco0` ON (`Aco0`.`alias` = 'links') LEFT JOIN `acos` AS
`Aco1` ON (`Aco1`.`lft` > `Aco0`.`lft` AND `Aco1`.`rght` <
`Aco0`.`rght` AND `Aco1`.`alias` = 'mod_edit') WHERE ((`Aco`.`lft`
<= `Aco0`.`lft` AND `Aco`.`rght` >= `Aco0`.`rght`) OR (`Aco`.`lft`
<= `Aco1`.`lft` AND `Aco`.`rght` >= `Aco1`.`rght`)) ORDER BY
`Aco`.`lft` DESC
This is not perfekt, but I can life with this values. But it would be
nice, if I could get this querys down in time too!
Will be there some acl-caching as core feature in cakephp 1.2? Or have I
to do it by myself?
Thank you very much!
Bye
Marcus
smime.p7s
Description: S/MIME Cryptographic Signature
