tags:

views:

40

answers:

2

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
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
@Web Unfortunately I don't understand... Maybe you want to make a separate question for it, if it's a separate topic.
deceze
@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
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