Run EXPLAIN ANALYZE and read the plan
Put EXPLAIN ANALYZE in front of the slow query (MySQL and PostgreSQL). In SQL Server Management Studio, turn on Include Actual Execution Plan and run it. Look for the step with the most time and for big gaps between estimated and actual rows.
Good if you don't know yet where the time goes
Skip if the query is an UPDATE or DELETE you can't wrap in BEGIN and ROLLBACK