[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2021-06-25 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2020-10-16 Thread Irit Katriel


Irit Katriel  added the comment:

This seems complete, can it be closed?

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-09-20 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 4fb672ff96ecbb87aaf2ecc4f04aed76aafe63b1 by Berker Peksag (Miss 
Islington (bot)) in branch '3.6':
bpo-32215: Fix performance regression in sqlite3 (GH-8511)
https://github.com/python/cpython/commit/4fb672ff96ecbb87aaf2ecc4f04aed76aafe63b1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-09-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8867

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-09-20 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 015cd0f5cb17b1b208a92e549cd665dc38f2f699 by Berker Peksag (Miss 
Islington (bot)) in branch '3.7':
bpo-32215: Fix performance regression in sqlite3 (GH-8511)
https://github.com/python/cpython/commit/015cd0f5cb17b1b208a92e549cd665dc38f2f699


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-09-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8864

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-09-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8857

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-09-20 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 8d1e190fc507a9e304f6817e761e9f628a23cbd8 by Berker Peksag in 
branch 'master':
bpo-32215: Fix performance regression in sqlite3 (GH-8511)
https://github.com/python/cpython/commit/8d1e190fc507a9e304f6817e761e9f628a23cbd8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-09-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8856

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-07-28 Thread Berker Peksag


Berker Peksag  added the comment:

https://github.com/python/cpython/commit/ab994ed8b97e1b0dac151ec827c857f5e7277565
 wasn't merged in the 2.7 branch, so this should only be reproduced in Python 
3.6+.

--
components:  -Interpreter Core
versions: +Python 3.8 -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2018-07-28 Thread Berker Peksag


Change by Berker Peksag :


--
keywords: +patch
pull_requests: +8028
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-05 Thread Berker Peksag

Change by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-05 Thread Brian Forst

Brian Forst  added the comment:

Hi Antoine, yup, adding a space after the UPDATE makes the speed difference 
disappear on macOS Sierra and Windows 7.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-05 Thread R. David Murray

R. David Murray  added the comment:

It disappears for me running it on linux with the blank added.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Brian, does the speed difference disappear when you add a space character just 
after "UPDATE"?
We may be hitting this path: 
https://github.com/python/cpython/blob/master/Modules/_sqlite/statement.c#L76-L93

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-04 Thread R. David Murray

Change by R. David Murray :


--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-04 Thread R. David Murray

R. David Murray  added the comment:

...using the *same* sqlite version...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-04 Thread R. David Murray

R. David Murray  added the comment:

I can confirm that there is a difference on linux as well, using the sqlite 
version for both 2.7 and 3.7:

rdmurray@pydev:~/python/p27[2.7]>./python sqlite3_27_36_performance_bug.py
First step: 3.22849011421
Second step: 3.2167429924

rdmurray@pydev:~/python/p37[master]>./python 
../p27/sqlite3_27_36_performance_bug.py
First step: 3.2722721099853516
Second step: 4.094221353530884

(I changed time.clock() to time.time()).

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32215] sqlite3 400x-600x slower depending on formatting of an UPDATE statement in a string

2017-12-04 Thread Brian Forst

New submission from Brian Forst :

We're moving some code from Python 2.7 to 3.6 and found a weird performance 
issue using SQLite in-memory and on-disk DBs with the built-in sqlite3 library. 
In Python 2.7, the two update statements below (excerpted from the attached 
file) run in the same amount of time. In Python 3.6 the update statement with 
the table name on a separate line runs 400x-600x slower with the example data 
provided in the file.

"""
UPDATE tbl
SET col2 = NULL
WHERE col1 = ?
"""

"""
UPDATE
  tbl
SET col2 = NULL
WHERE col1 = ?
"""

We have verified this using Python installs from python.org on macOS Sierra and 
Windows 7 for Python 2.7 and 3.6.

We have tried formatting the SQL strings in different ways and it appears that 
the speed change only occurs when the table name is on a different line than 
the "UPDATE".

This also appears to be hitting some type of quadratic behaviour as with 10x 
less records, it only takes 10-15x as long. With the demo in the file we are 
seeing it take 1.6s on the fast string and ~1000s on the slow string.

--
components: Interpreter Core, Library (Lib)
files: sqlite3_27_36_performance_bug.py
messages: 307609
nosy: bforst
priority: normal
severity: normal
status: open
title: sqlite3 400x-600x slower depending on formatting of an UPDATE statement 
in a string
type: performance
versions: Python 2.7, Python 3.6
Added file: https://bugs.python.org/file47315/sqlite3_27_36_performance_bug.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com