diff options
author | Christopher Baines <mail@cbaines.net> | 2020-05-25 15:12:07 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-05-25 15:16:16 +0100 |
commit | ba855028891640a6b8500c7e308dc51c762f6a96 (patch) | |
tree | c1015080b9f7c8ffba87190fb72b7fa2a665de7b /tests | |
parent | 68a6912ce2e5d281bc7b45bf447b7695f5425388 (diff) | |
download | cuirass-ba855028891640a6b8500c7e308dc51c762f6a96.tar cuirass-ba855028891640a6b8500c7e308dc51c762f6a96.tar.gz |
Begin tuning db-get-builds for performancedb-get-builds-performance-tuning
Now that I actually have some experience using SQLite from writing the Guix
Build Coordinator, I can actually see potential ways to improve bits of
Cuirass.
The intention here is to start to address the performance of db-get-builds,
which I think can be quite slow.
This commit does several things, the big change is to try and construct a
simpler query for SQLite. I'm not confident that SQLite's query planner can
look past handling the NULL parameters, so I think it could be helpful to try
and create a simpler query, both to avoid that problem if it exists, but also
move the complexity in to Guile code, which I think is a bit more manageable.
The way ordering is handled is also changed. Order is one of the filters,
although it's not a filter, and some of the other filters also influenced the
order. I think there are things still to fix/improve with the handling of
ordering, but at least this commit just has the ordering happen once in the
query.
If this direction sounds OK, I think the next things to do is do a bit more
testing, both to check uses of this query still work as intended, but also to
take those specific queries generated by db-get-builds, and check what SQLite
says when running them with EXPLAIN QUERY PLAN, as that should inform further
improvements, and what indexes to create.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions