Closed pkgw closed 7 years ago
FWIW: If I add clauses to the search terms to limit the selections to only relatively recent files, the queries are much easier on the server. But it'd be nice for arbitrary user queries to not run the risk of hammering the server like this ... especially since they currently cause the Librarian to lock up and be unable to address any other operations while it's running the query.
Fixed in 5ed1ba5b — just needed to add an index on FileEvent.name and everything is much, much faster. And alembic made the upgrade of the live system super straightforward.
At the moment, the DB queries that we run to check out the "standing orders" seem to be very hard on the database server, pegging its CPU at 100% for several minutes. Here's the kind of query that seems to be the culprit:
This should be optimized.