explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Be14

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 0.152 ↑ 360.0 2 1

Seq Scan on templates (cost=88.81..11,298.41 rows=720 width=116) (actual time=0.128..0.152 rows=2 loops=1)

2.          

CTE t

3. 0.056 0.107 ↑ 690.0 1 1

GroupAggregate (cost=75.01..88.81 rows=690 width=122) (actual time=0.107..0.107 rows=1 loops=1)

  • Group Key: tt.id
4. 0.011 0.051 ↑ 230.0 3 1

Sort (cost=75.01..76.74 rows=690 width=232) (actual time=0.050..0.051 rows=3 loops=1)

  • Sort Key: tt.id
  • Sort Method: quicksort Memory: 25kB
5. 0.015 0.040 ↑ 230.0 3 1

Hash Right Join (cost=25.52..42.48 rows=690 width=232) (actual time=0.031..0.040 rows=3 loops=1)

  • Hash Cond: (stt.task_id = tt.id)
6. 0.013 0.013 ↑ 183.3 3 1

Seq Scan on sub_tasks_template stt (cost=0.00..15.50 rows=550 width=146) (actual time=0.010..0.013 rows=3 loops=1)

7. 0.004 0.012 ↑ 690.0 1 1

Hash (cost=16.90..16.90 rows=690 width=90) (actual time=0.012..0.012 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.008 0.008 ↑ 690.0 1 1

Seq Scan on task_template tt (cost=0.00..16.90 rows=690 width=90) (actual time=0.007..0.008 rows=1 loops=1)

9.          

SubPlan (for Seq Scan)

10. 0.022 0.134 ↑ 1.0 1 2

Aggregate (cost=15.53..15.54 rows=1 width=32) (actual time=0.067..0.067 rows=1 loops=2)

11. 0.112 0.112 ↓ 0.0 0 2

CTE Scan on t (cost=0.00..15.52 rows=3 width=122) (actual time=0.056..0.056 rows=0 loops=2)

  • Filter: (template_id = templates.id)
  • Rows Removed by Filter: 0
Planning time : 0.341 ms
Execution time : 0.238 ms