Diagnose and improve slow queries across relational, document, key-value, search, analytical, graph, time-series, and vector databases by identifying the current database choice, reading the relevant query plan or profiling output, reasoning about complexity and access patterns, and choosing safe optimization paths with clear tradeoffs.