Terrible performance in Zend Db PDO_sqlite insert

2019-08-27 02:41发布

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?

0条回答
登录 后发表回答