Optimize various database queries
Although extensive performance profiling has been done, some queries might still be able to benefit from new indexes (more research needed, ordering on the card filters in particular).
Additionally, the filters (cards, expansions) often make use of subqueries, but these subqueries often return a recordset much larger than needed. The problem is that there is no way of knowing which conditions/filters from the parent query can/should also be applied to the subquery. However, if an IN
clause is used, and the subquery simply returns a bunch of IDs, further optimization might not be needed, because it's likely that a materialized subquery with hash lookups will be used.
It might also be worth looking into specialized databases such as ElasticSearch for certain queries.