diff options
author | Dan McGee <dan@archlinux.org> | 2012-11-20 22:57:05 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-11-21 01:17:48 +0100 |
commit | 160a08bba5324b25abd9e866b884c91d75e597b0 (patch) | |
tree | f1e6dd7cd724a584682970fa43cfdcba0b54ca40 /packages/utils.py | |
parent | 9e9157d0a8cbf9ea076231e438fb30f58bff8e29 (diff) | |
download | archweb-160a08bba5324b25abd9e866b884c91d75e597b0.tar.gz archweb-160a08bba5324b25abd9e866b884c91d75e597b0.tar.xz |
Improve performance of todolists query
Use some standard SQL and split the query into two different parts to
save a lot of unnecessary sorting and field retrieval at the database
level. The `CASE WHEN complete THEN 1 ELSE 0 END` syntax should be
accepted by any database that implements proper SQL; it was tested in
PostgreSQL and sqlite3 without issues.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/utils.py')
0 files changed, 0 insertions, 0 deletions