我只是在Zend中設置了FirePHP,並且我注意到大量的DESCRIBE查詢。某些頁面在同一張表上有50個或更多相同的查詢。例如Zend Framework中有大量的DESCRIBE查詢
0.00198 connect NULL 0.00449 DESCRIBE `nodes` NULL 0.00041 SELECT `nodes`.* FROM `nodes` WHERE (((`nodes`.`id` = 111))) NULL 0.0037 DESCRIBE `nodes` NULL 0.00155 SELECT `nodes`.* FROM `nodes` WHERE (((`nodes`.`id` = 111))) NULL 0.00059 SELECT `nodes`.* FROM `nodes` WHERE (parent_id = '111') ORDER BY `order` ASC, `id` ASC NULL 0.00366 DESCRIBE `nodes` NULL 0.0054 DESCRIBE `nodes` NULL 0.0049 DESCRIBE `nodes` NULL 0.00519 DESCRIBE `nodes` NULL 0.00492 DESCRIBE `nodes` NULL 0.00691 DESCRIBE `nodes` NULL 0.00741 DESCRIBE `nodes` NULL 0.0048 DESCRIBE `nodes` NULL 0.00556 DESCRIBE `nodes` NULL 0.00516 DESCRIBE `nodes` NULL 0.00487 DESCRIBE `nodes` NULL
...然後繼續。
是由框架生成的所有這些DESCRIBE查詢(我使用Zend_DbTable)?他們都是必需的嗎?我應該擔心它們還是不會影響性能?
我對此感興趣。你知道設置$ cache部分的好資源嗎? – Sonny 2010-02-09 20:56:54
查看Zend框架手冊:http://framework.zend.com/manual/en/zend.db.table.html#zend.db.table.metadata.caching – Johnco 2010-02-09 21:48:59
我讀過。我正在尋找有關不同設置的優缺點的建議,例如使用什麼緩存類型,使用「文件」類型時要使用的目錄等。 – Sonny 2010-02-10 16:44:04