Zend Framework $table->fetchRow() is very slow
It is taki开发者_JAVA百科ng .6-.8 seconds for this line of my code to execute in my users table model:
$row = $this->fetchRow("username = '$username'");
I'm caching my table metadata for all tables already.
Any idea what could be causing this slowness?
There's a ton of different things that are most likely adding up to the slow execution time (everything from excessive modules in apache / php to file IO issues causing the database to slow down). Have you considered using a tool such as http://www.xdebug.org/ to profile your code? This should let you break it down into different sections and see exactly what is taking the most time.
Zend also provides a performance guide for the framework http://framework.zend.com/manual/en/performance.html
Also, new version of Zend Server also allows great level of profiling.
Is there an index on the username column of your table?
精彩评论