zuul/tests
James E. Blair 95bd778fcc Split build/buildset list queries into two
The only way to get reasonable performance out of all three databases
(mariadb, mysql, postgres) appears to be to make the following changes:

* Use group-by instead of distinct.
  Some versions of mysql produce the wrong output with distinct;
  this is more descriptive of what we want anyway.
* Split the query into two statements instead of joining on a subquery.
  Mariadb seems to be unable to produce a good query plan for the
  buildset list query.  Neither mariadb nor mysql support using
  "IN" with a subquery (so the idea of using IN instead of JOIN for
  the subquery is out).

These methods now perform a query to get the ids of the builds or
buildsets that match the criteria, then perform a second query to load
the ORM objects that match those ids.  This appears to be quite
fast for all three queries with the latest versions of all three database
systems.

Change-Id: I30bb3214807dfa8b26a848f85bb7a7bc660c6c1d
2024-04-09 06:39:08 -07:00
..
fixtures Merge "Add zuul_unreachable ansible host group" 2024-03-25 18:26:14 +00:00
remote Replace Ansible 6 with Ansible 9 2024-02-15 16:20:45 -08:00
unit Split build/buildset list queries into two 2024-04-09 06:39:08 -07:00
zuul_client Finish circular dependency refactor 2024-02-09 07:39:40 -08:00
__init__.py Add non-voting jobs. 2012-08-23 23:20:09 +00:00
base.py Finish circular dependency refactor 2024-02-09 07:39:40 -08:00
encrypt_secret.py Make tests' encrypt_secret.py work with python3 2017-10-19 18:09:57 +00:00
fake_graphql.py Check if Github detected a merge conflict for a PR 2022-11-18 11:59:32 +01:00
fakegithub.py Finish circular dependency refactor 2024-02-09 07:39:40 -08:00
fakegitlab.py Check blocking_discussions_resolved in gitlab driver 2024-01-24 20:35:28 +00:00
make_playbooks.py Fix more file opening ResourceWarnings 2023-02-07 17:12:15 -08:00
otlp_fixture.py Tracing: implement span save/restore 2022-09-19 08:42:28 +02:00
print_layout.py Do not add implied branch matchers in project-templates 2017-09-30 10:19:07 -07:00