php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47922 PDO_SQLITE: reopen database for each update query if no alive results exists
Submitted: 2009-04-08 08:00 UTC Modified: 2015-09-13 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: homm86 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: PDO SQLite
PHP Version: 5.2.9 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-04-08 08:00 UTC] homm86 at gmail dot com
Description:
------------
Database begin slow down on simple queries, such as INSERT, UPDATE, DELETE. This is paradox, but sqlite slowdown updates when not alive results in memory presence. If we have alive result with non-zero count of elements, updates runs very fast. 
The only difference between two passages in example is unset($helper), but this gives more then 150x slowdown. I also notice hi disk usage while operation. I think driver in second pass reopen database for write.

Reproduce code:
---------------
http://pastebin.com/f595e2031

Expected result:
----------------
I want same time for both passages.

Actual result:
--------------
Results different on 150 times.

0.0336790084839
5.47776293755

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-01 12:51 UTC] felipe@php.net
-Package: PDO related +Package: PDO SQLite
 [2015-09-02 02:18 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-09-02 02:18 UTC] cmb@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2015-09-13 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 10:01:28 2024 UTC