explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MivG

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 0.157 ↑ 360.0 2 1

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

2.          

CTE temp_table

3. 0.066 0.114 ↑ 345.0 2 1

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

  • Group Key: tt.id
4. 0.009 0.048 ↑ 172.5 4 1

Sort (cost=75.01..76.74 rows=690 width=236) (actual time=0.048..0.048 rows=4 loops=1)

  • Sort Key: tt.id
  • Sort Method: quicksort Memory: 25kB
5. 0.017 0.039 ↑ 172.5 4 1

Hash Right Join (cost=25.52..42.48 rows=690 width=236) (actual time=0.032..0.039 rows=4 loops=1)

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

Seq Scan on sub_tasks_template stt (cost=0.00..15.50 rows=550 width=150) (actual time=0.009..0.011 rows=3 loops=1)

7. 0.004 0.011 ↑ 345.0 2 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
8. 0.007 0.007 ↑ 345.0 2 1

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

9.          

SubPlan (for Seq Scan)

10. 0.018 0.138 ↑ 1.0 1 2

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

11. 0.120 0.120 ↑ 3.0 1 2

CTE Scan on temp_table (cost=0.00..15.52 rows=3 width=122) (actual time=0.060..0.060 rows=1 loops=2)

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