MySQL vs PostgreSQL -- Choose the Right Database for Your Project

Peter Labos

If I understand properly “logging API queries”, this should avoid DB completely. Not really good choice indexing this stuff realtime. Best option is save it to filesystem and then install and use some log processing/searching software or SaaS api. To send files to different company to process it and giving you all the search options even fulltext ones.
If it is something with more sensitive sata and less volume use some message queue system.