This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/data
Joseph Schorr b5bb76cdea Optimize repository search by changing our lookup strategy
Previous to this change, repositories were looked up unfiltered in six different queries, and then filtered using the permissions model, which issued a query per repository found, making search incredibly slow. Instead, we now lookup a chunk of repositories unfiltered and then filter them via a single query to the database. By layering the filtering on top of the lookup, each as queries, we can minimize the number of queries necessary, without (at the same time) using a super expensive join.

Other changes:
- Remove the 5 page pre-lookup on V1 search and simply return that there is one more page available, until there isn't. While technically not correct, it is much more efficient, and no one should be using pagination with V1 search anyway.
- Remove the lookup for repos without entries in the RAC table. Instead, we now add a new RAC entry when the repository is created for *the day before*, with count 0, so that it is immediately searchable
- Remove lookup of results with a matching namespace; these aren't very relevant anyway, and it overly complicates sorting
2017-03-09 19:47:55 -05:00
..
interfaces Optimize repository search by changing our lookup strategy 2017-03-09 19:47:55 -05:00
migrations Fix db migration revision 2017-01-31 11:38:31 -05:00
model Optimize repository search by changing our lookup strategy 2017-03-09 19:47:55 -05:00
users Optimize repository search by changing our lookup strategy 2017-03-09 19:47:55 -05:00
__init__.py Refactor the code into modules, it was getting unweildy. 2013-09-25 12:45:12 -04:00
archivedlogs.py userfiles: make handler optional 2016-04-15 13:56:07 -04:00
billing.py Add even larger plans for enterprises on SaaS 2016-03-21 16:38:34 -04:00
buildlogs.py Change the append build log method to execute the two calls via one pipelined connection 2016-11-18 11:47:16 -05:00
database.py Eat AttributeError in peewee close database call 2017-02-22 13:21:12 -05:00
fields.py Full text support in peewee 2017-01-31 11:38:31 -05:00
queue.py feature(app.py): adding queue_metrics to queues 2017-02-14 16:01:28 -05:00
read_slave.py Add support for read slave databases. 2014-07-02 19:10:24 -04:00
runmigration.py Implement new step-by-step setup 2015-01-23 17:19:15 -05:00
text.py Full text support in peewee 2017-01-31 11:38:31 -05:00
userevent.py fix(userevent): ignore subscribe notifications in userevents 2017-01-20 13:38:02 -05:00
userfiles.py userfiles: make handler optional 2016-04-15 13:56:07 -04:00