For details on viewing MySQL logs, see section Viewing Slow Query Logs.
For details on viewing PostgreSQL logs, see section Viewing Error Logs.
For Microsoft SQL Server, you can query dynamic management views (DMVs) to locate the cause of slow queries. For details on DMVs, visit the Microsoft official website.
For details, see section Configuring Displayed Metrics.