As you know in cakephp with every find (select) query an automatic count( * ) query is being generated (cakephp use it for pagination) I'm running a query in a table with 2 million records and my query runs in 0.0016 sec. but the count( * ) generated by cakephp takes several seconds Is there a way to prevent cakephp from running this query? Can I disable or false it? My cakephp version is 1.3
Edited (Solved): I've found that when I use manual joins in my query, cakephp find count query will be so expensive. So the solution is to remove all manual joins and then set recursive of find count to -1 in cakephp paginate function