Since I have not worked with large datasets like this, here are some ideas that might work:
The first question is whether these entries are static (e.g. geoip) or not?
- I would try to optimize my database as much as I can (try using EXPLAIN if you are using MySQL)
- Look at all the possible queries, try to optimize your database for these queries.
- If the indices are ok, I will go with some kind of cache where I would save my previous results. It will be convenient if your database is not updated regularly.
- You can complete the task above (for example: the most frequently used search queries and their results can also be removed)
- Try optimizing these ideas for your needs.
If you can provide more information, I can clarify my advice.
source share