Terrible performance in Zend Db PDO_sqlite insert and update queries

不羁的心 提交于 2019-12-25 08:58:13

问题


I'm having some major issues with my sqlite database performance. I'm using it for storing small amount of data, which should be really fast, but somehow takes way too long. First of all, I create Zend_Db object with factory static method:

$this->db = Zend_Db::factory('PDO_SQLITE', $params);

Afterwards I run some simple query:

$this->db->query($q)

And here goes time from logs:

2012-04-26 13:08:06.752855 : UPDATE session SET value='542M',timeStamp='1335438486' , type='999',ip='62.21.30.77' WHERE name='code1' AND id_session='8fac3359f5c352b64a807745667746ce' 0.1453s

0.1453s seems really huge for such simple query. Moreover sometimes similar queries last almost 0.5s.

The database have created indexes.

Any ideas what might be the issue? Or is this how Zend_Db works with sqlite?

来源:https://stackoverflow.com/questions/10333125/terrible-performance-in-zend-db-pdo-sqlite-insert-and-update-queries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!