explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7XrI

Settings
# exclusive inclusive rows x rows loops node
1. 31.152 571.326 ↓ 468.8 2,344 1

Gather (cost=1,122.92..7,703.71 rows=5 width=46) (actual time=10.448..571.326 rows=2,344 loops=1)

  • Output: employees.emp_no, employees.first_name, employees.last_name, titles.title, salaries.salary, salaries.from_date
  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=16,139
2. 5.952 540.174 ↓ 390.5 781 3 / 3

Nested Loop (cost=122.92..6,703.21 rows=2 width=46) (actual time=8.793..540.174 rows=781 loops=3)

  • Output: employees.emp_no, employees.first_name, employees.last_name, titles.title, salaries.salary, salaries.from_date
  • Inner Unique: true
  • Join Filter: (employees.emp_no = salaries.emp_no)
  • Buffers: shared hit=16,139
  • Worker 0: actual time=10.692..530.017 rows=382 loops=1
  • Buffers: shared hit=4,018
  • Worker 1: actual time=7.609..538.668 rows=402 loops=1
  • Buffers: shared hit=3,667
3. 267.033 528.429 ↑ 1.3 1,159 3 / 3

Hash Join (cost=122.49..5,646.49 rows=1,458 width=46) (actual time=8.722..528.429 rows=1,159 loops=3)

  • Output: employees.emp_no, employees.first_name, employees.last_name, titles.title, titles.emp_no, titles.from_date
  • Inner Unique: true
  • Hash Cond: (titles.emp_no = employees.emp_no)
  • Buffers: shared hit=3,365
  • Worker 0: actual time=10.581..521.165 rows=837 loops=1
  • Buffers: shared hit=1,124
  • Worker 1: actual time=7.546..530.065 rows=700 loops=1
  • Buffers: shared hit=1,164
4. 252.877 252.877 ↑ 1.3 147,769 3 / 3

Parallel Seq Scan on employees.titles (cost=0.00..5,039.12 rows=184,712 width=23) (actual time=0.028..252.877 rows=147,769 loops=3)

  • Output: titles.emp_no, titles.title, titles.from_date, titles.to_date
  • Buffers: shared hit=3,192
  • Worker 0: actual time=0.019..249.694 rows=146,117 loops=1
  • Buffers: shared hit=1,052
  • Worker 1: actual time=0.050..255.733 rows=151,665 loops=1
  • Buffers: shared hit=1,092
5. 4.214 8.519 ↑ 1.0 2,344 3 / 3

Hash (cost=92.88..92.88 rows=2,369 width=23) (actual time=8.506..8.519 rows=2,344 loops=3)

  • Output: employees.emp_no, employees.first_name, employees.last_name
  • Buckets: 4,096 Batches: 1 Memory Usage: 159kB
  • Buffers: shared hit=89
  • Worker 0: actual time=10.383..10.390 rows=2,344 loops=1
  • Buffers: shared hit=30
  • Worker 1: actual time=7.143..7.170 rows=2,344 loops=1
  • Buffers: shared hit=30
6. 4.305 4.305 ↑ 1.0 2,344 3 / 3

Index Scan using employees_pkey on employees.employees (cost=0.42..92.88 rows=2,369 width=23) (actual time=0.065..4.305 rows=2,344 loops=3)

  • Output: employees.emp_no, employees.first_name, employees.last_name
  • Index Cond: (employees.emp_no < 12345)
  • Buffers: shared hit=89
  • Worker 0: actual time=0.048..5.224 rows=2,344 loops=1
  • Buffers: shared hit=30
  • Worker 1: actual time=0.111..3.656 rows=2,344 loops=1
  • Buffers: shared hit=30
7. 5.793 5.793 ↑ 1.0 1 3,476 / 3

Index Scan using salaries_pkey on employees.salaries (cost=0.43..0.71 rows=1 width=20) (actual time=0.005..0.005 rows=1 loops=3,476)

  • Output: salaries.emp_no, salaries.salary, salaries.from_date, salaries.to_date
  • Index Cond: ((salaries.emp_no = titles.emp_no) AND (salaries.from_date = titles.from_date))
  • Buffers: shared hit=12,774
  • Worker 0: actual time=0.006..0.006 rows=0 loops=837
  • Buffers: shared hit=2,894
  • Worker 1: actual time=0.007..0.007 rows=1 loops=700
  • Buffers: shared hit=2,503
Planning time : 0.617 ms
Execution time : 574.770 ms