explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1pZ7

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 0.612 ↑ 1.0 2 1

Seq Scan on templates (cost=2.13..3.27 rows=2 width=116) (actual time=0.600..0.612 rows=2 loops=1)

2.          

CTE temp_table

3. 0.049 0.563 ↑ 1.0 2 1

HashAggregate (cost=2.11..2.13 rows=2 width=122) (actual time=0.561..0.563 rows=2 loops=1)

  • Group Key: tt.id
4. 0.145 0.514 ↓ 1.3 4 1

Hash Right Join (cost=1.04..2.09 rows=3 width=236) (actual time=0.505..0.514 rows=4 loops=1)

  • Hash Cond: (stt.task_id = tt.id)
5. 0.020 0.020 ↑ 1.0 3 1

Seq Scan on sub_tasks_template stt (cost=0.00..1.03 rows=3 width=150) (actual time=0.017..0.020 rows=3 loops=1)

6. 0.336 0.349 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=90) (actual time=0.349..0.349 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
7. 0.013 0.013 ↑ 1.0 2 1

Seq Scan on task_template tt (cost=0.00..1.02 rows=2 width=90) (actual time=0.010..0.013 rows=2 loops=1)

8.          

SubPlan (for Seq Scan)

9. 0.018 0.592 ↑ 1.0 1 2

Aggregate (cost=0.05..0.06 rows=1 width=32) (actual time=0.296..0.296 rows=1 loops=2)

10. 0.574 0.574 ↑ 1.0 1 2

CTE Scan on temp_table (cost=0.00..0.04 rows=1 width=122) (actual time=0.285..0.287 rows=1 loops=2)

  • Filter: (template_id = templates.id)
  • Rows Removed by Filter: 1
Planning time : 2.017 ms
Execution time : 0.851 ms