"not just for developers with little experience of database management"
Developers with little experience of database management can wreck performance just with application code.
Automated database systems based on vector embedding algorithms could improve the performance of default settings on common PostgreSQL database services by a factor of two to ten, according to a database researcher. Speaking to The Register, Andy Pavlo, associate professor at Carnegie Mellon University Database Group, …
One surprisingly simple optimization of SQL queries with several db-columns is to always select by the rarest feature first. Then the second rarest and so on, to the most common feature as last.
I assume it works by dramatically reducing memory and compute footprint in each loop.
If ‘your database is on fire’ I don’t think running some fine tuning to improve performance is the issue.
You need a DBA fireman with a fire axe to identify/intervene/fire break to stem the issue - likely someone’s shitty application…. or in my worst example an AV update that trashed exclusions and had McAfee grabbing SQL data-files for a real-time scan.