Would recursive=-1 help in case of find("list") in cakephp. I mean any performance benefit
A:
Try it!
In debug mode Cake shows you the running time of each query. Try both ways and see if anything changes. My guess is no, since it's only taking data from one table anyway for list
queries.
deceze
2010-10-13 06:21:05
one more doubt does caching request action caches it everywhere all controller or only specfic location. Hope i am making my self clear
Web Developer
2010-10-13 07:17:13
@Web Unfortunately I don't understand... Maybe you want to make a separate question for it, if it's a separate topic.
deceze
2010-10-13 07:20:13
@Web Developer - I agree this should be another question, but have a look at this site. I think you can use request action to cache certain parts of a view, for example a recent articles sidebox. http://mark-story.com/posts/view/how-using-requestaction-increased-performance-on-my-site/
jimiyash
2010-10-13 09:19:00
A:
With the default
$this->Post->find('list');
CakePHP make this query:
SELECT `Post`.`id`, `Post`.`name` FROM `posts` AS `Post` WHERE 1 = 1
No recursive query, so changing that command will not improve the query
Cristian Deluxe
2010-10-15 01:50:20