explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cAEO

Settings
# exclusive inclusive rows x rows loops node
1. 14.950 21.941 ↑ 83.3 60,000 1

Nested Loop (cost=119.67..62,722.17 rows=5,000,000 width=12) (actual time=0.362..21.941 rows=60,000 loops=1)

2. 0.091 0.091 ↑ 3.3 300 1

Function Scan on generate_series b (cost=0.00..10.00 rows=1,000 width=4) (actual time=0.049..0.091 rows=300 loops=1)

3. 6.402 6.900 ↑ 25.0 200 300

Materialize (cost=119.66..224.66 rows=5,000 width=8) (actual time=0.001..0.023 rows=200 loops=300)

4. 0.154 0.498 ↑ 25.0 200 1

Merge Join (cost=119.66..199.66 rows=5,000 width=8) (actual time=0.303..0.498 rows=200 loops=1)

  • Merge Cond: (a.a = c.c)
5. 0.067 0.122 ↑ 5.0 200 1

Sort (cost=59.83..62.33 rows=1,000 width=4) (actual time=0.100..0.122 rows=200 loops=1)

  • Sort Key: a.a
  • Sort Method: quicksort Memory: 34kB
6. 0.055 0.055 ↑ 5.0 200 1

Function Scan on generate_series a (cost=0.00..10.00 rows=1,000 width=4) (actual time=0.033..0.055 rows=200 loops=1)

7. 0.113 0.222 ↑ 5.0 201 1

Sort (cost=59.83..62.33 rows=1,000 width=4) (actual time=0.198..0.222 rows=201 loops=1)

  • Sort Key: c.c
  • Sort Method: quicksort Memory: 43kB
8. 0.109 0.109 ↑ 2.5 400 1

Function Scan on generate_series c (cost=0.00..10.00 rows=1,000 width=4) (actual time=0.064..0.109 rows=400 loops=1)

Planning time : 0.135 ms
Execution time : 26.321 ms