The DESC stuff is used by the model to allow you to use the magic DB functions. Without that introspection there is no way for your model to automatically know the names of all the columns.
On 8/28/06, Fasthold <[EMAIL PROTECTED]> wrote: > > Hi, there > > This question has puzzled me for a long time. > > I found that as long as the cache expired(I hope I'm right:P), there > are many addtional queries excuted like below: > > 1 DESC `users` 21 21 15 > 2 DESC `groups` 5 5 26 > 3 DESC `permissions` 4 4 32 > 4 DESC `articles` 10 10 28 > 5 DESC `categories` 6 6 29 > 6 DESC `votes` 12 12 34 > 7 SELECT `User`.`id`, `User`.`group_id`, `User`.`username`, > `User`.`password`, `User`.`mobile`, `User`.`area`, `User`.`email`, > `User`.`gender`, `User`.`photo`, `User`.`name`, `User`.`pid`, > `User`.`description`, `User`.`created`, `User`.`modified`, > `Group`.`id`, `Group`.`name`, `Group`.`isAdmin`, `Group`.`created`, > `Group`.`modified` FROM `users` AS `User` LEFT JOIN `groups` AS `Group` > ON `User`.`group_id` = `Group`.`id` WHERE (`User`.`id` = 135) LIMIT 1 > 1 1 16 > > I only need the 7th 'SELECT' statement, but the other queries take much > more loads of the server. I have tried the 'unbindModel()' method, but > it seems useless. > > Is there any possible to cut these 'DESC' queries or prolong the cache > period for performance purpose. > > Thanks! > > -- FH. > > > > > -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never have." -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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/cake-php -~----------~----~----~----~------~----~------~--~---
