Explain Patterns

Browse our collection of common query execution plans to understand how databases process your SQL.

postgresql

PostgreSQL Sequential Scan

Understand how a Sequential Scan works in PostgreSQL and when to optimize it.
#postgresql#seq scan#sequential scan
postgresql

PostgreSQL Index Scan

Visualize a standard Index Scan in PostgreSQL execution plans.
#postgresql#index scan#btree
mysql

MySQL Simple Select

A basic MySQL execution plan showing a simple table lookup.
#mysql#explain#simple
mysql

MySQL Filesort

Understanding the "Using filesort" operation in MySQL queries.
#mysql#filesort#sorting
sqlite

SQLite Scan Table

Full table scan in SQLite.
#sqlite#scan#table scan
sqlite

SQLite Search Index

Index lookup in SQLite.
#sqlite#search#index
postgresql

PostgreSQL Hash Join

Learn how PostgreSQL performs Hash Joins between two tables.
#postgresql#hash join#join
postgresql

PostgreSQL CTE (With)

Visualizing Common Table Expressions (WITH clauses) in query plans.
#postgresql#cte#with clause
postgresql

PostgreSQL Aggregation

Understanding HashAggregate and GroupAggregate operations.
#postgresql#aggregate#group by
postgresql

PostgreSQL Window Function

Execution plan for a query using window functions (OVER clause).
#postgresql#window function#rank
postgresql

PostgreSQL Parallel Scan

Parallel sequential scan leveraging multiple CPU cores.
#postgresql#parallel#gather
postgresql

PostgreSQL Bitmap Scan

Bitmap Heap Scan combining multiple index results.
#postgresql#bitmap scan#index
postgresql

PostgreSQL Merge Join

Merge Join operation on two sorted inputs.
#postgresql#merge join#join
postgresql

PostgreSQL Subquery Scan

Scanning a subquery that could not be flattened.
#postgresql#subquery#limit
mysql

MySQL Join with Index

An optimized MySQL join using index lookups (ref).
#mysql#join#ref
mysql

MySQL UNION

Handling UNION operations with temporary tables.
#mysql#union#temporary table
mysql

MySQL Subquery

Correlated subquery execution.
#mysql#subquery#performance
mysql

MySQL Covering Index

Query satisfied entirely by the index (Using index).
#mysql#covering index#index
mysql

MySQL Derived Table

Querying a subquery in the FROM clause.
#mysql#derived table#subquery
mysql

MySQL Full Join (Simulated)

MySQL does not support FULL OUTER JOIN natively.
#mysql#full join#union
sqlite

SQLite Covering Index

Covering index scan in SQLite.
#sqlite#covering index#performance
sqlite

SQLite Temp B-Tree

Sorting using a temporary B-Tree.
#sqlite#sort#temp b-tree
sqlite

SQLite Compound Subquery

Subquery optimization in SQLite.
#sqlite#subquery#compound