2009年9月30日星期三

[fw-db] Zend_Db::fetchAll() unacceptably slow

Hi.

I have mysql table:

CREATE TABLE `brand` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Car brand ID',
`title` varchar(32) default NULL COMMENT 'Car brand title',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8 CHECKSUM=1
DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC

with 93 records inserted.

I'm using Zend_Db with MYSQLI adapter. When I execute fetchAll(null,
'title') it takes 15 seconds to complete fetch!!! This is terrible slow,
isn't it?

Profiler says:

0.00114 SELECT `brand`.* FROM `brand` ORDER BY `title` ASC

which is ok and blazing fast.

Looks like fetchAll is wasting time somewhere. This is not unacceptable.

Any idea?
--
View this message in context: http://www.nabble.com/Zend_Db%3A%3AfetchAll%28%29-unacceptably-slow-tp25679668p25679668.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: