Identifying Slow Queries and Fixing Them

Talk Type: 
45 Minute Talk
Track: 
Performance
Technical Level: 
Beginner
License: 
BSD

Slow queries can impact every site, but how to identify and fix them? This talk will cover basic poor query performance analysis and will go over the steps to improve them.

Specifically, we'll be looking at PostgreSQL configuration options (in postgresql.conf) for logging and basic tuning parameters, then going over EXPLAIN and EXPLAIN ANALYZE output for select queries, what the EXPLAIN output means in terms of how the query is being executed, and then going over ways to improve the queries, including index creation, rewriting the query to allow PG to use a different plan, and how to tune parameters for specific queries.