Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
7f740f33
Commit
7f740f33
authored
Aug 14, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqlite: comment about slow GROUP_CONCAT function (used to check replicas)
parent
e9dae1f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
neo/storage/database/sqlite.py
neo/storage/database/sqlite.py
+2
-1
No files found.
neo/storage/database/sqlite.py
View file @
7f740f33
...
...
@@ -597,6 +597,7 @@ class SQLiteDatabaseManager(DatabaseManager):
self
.
commit
()
def
checkTIDRange
(
self
,
partition
,
length
,
min_tid
,
max_tid
):
# XXX: SQLite's GROUP_CONCAT is slow (looks like quadratic)
count
,
tids
,
max_tid
=
self
.
query
(
"""
\
SELECT COUNT(*), GROUP_CONCAT(tid), MAX(tid)
FROM (SELECT tid FROM trans
...
...
@@ -610,7 +611,7 @@ class SQLiteDatabaseManager(DatabaseManager):
def
checkSerialRange
(
self
,
partition
,
length
,
min_tid
,
max_tid
,
min_oid
):
u64
=
util
.
u64
# We don't ask
MySQL
to compute everything (like in checkTIDRange)
# We don't ask
SQLite
to compute everything (like in checkTIDRange)
# because it's difficult to get the last serial _for the last oid_.
# We would need a function (that could be named 'LAST') that returns the
# last grouped value, instead of the greatest one.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment