The Magento 2.3 update inadvertently triggered a database performance bottleneck due to an issue with the Popular Search Term Cache feature. This problem increases with every search term that gets added to the search_query table. Attempts to fix the issue didn't address the root cause and only treated symptoms. However, there are possible solutions that don't require a full system revamp. Notably, the removal of the redundant DISTINCT operator and effective indexing of the search_query table could drastically improve performance. This could be further aided by inserting search terms in batches and reassessing the usefulness of the Popular Search Term Cache feature in terms of performance. These solutions can significantly boost Magento 2.3's performance without losing functionality.
Full article here: https://lawsuithelpdesk.com/unmasking-magento-2-3-decoding-the-database-debacle-and-how-to-turbocharge-its-performance/