Wouldnt this problem be fixed by introducing a DWH style layer to handle trade without affecting the core database? It would just replicate data to the trade layer and update accordingly when items appear and dissapear. This would also probably speed up queries, as you can use fancy DWH techniques to optimise massive queries.
This way the query amount wouldnt have an effect on the core game.
//Thanks for the downvotes.
We already use separate dedicated databases for storing and managing trade data.
Unfortunately this league is the perfect league to spam requests from trade macros and other trade tools. We're working on optimising what we can as well as increasing capacity further.
To be clear, this is a problem with handling search requests. The Public Stash API (where we get all our item data from) is operating well enough for us to keep up with item changes. The exception to this was yesterday where some changes we made inadvertently tipped the scales to not being able to keep up. Unfortunately when this happens it is usually 2-4AM NZDT and we can be slow to react.