explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X4fX

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 0.181 ↑ 6.0 1 1

Seq Scan on templates (cost=50.61..136.58 rows=6 width=148) (actual time=0.179..0.181 rows=1 loops=1)

  • Filter: (product_name = ANY ('{string,qq}'::text[]))
  • Rows Removed by Filter: 2
2.          

CTE temp_table

3. 0.052 0.102 ↑ 127.5 4 1

GroupAggregate (cost=39.09..50.61 rows=510 width=162) (actual time=0.052..0.102 rows=4 loops=1)

  • Group Key: tt.id
4. 0.009 0.050 ↑ 85.0 6 1

Merge Left Join (cost=39.09..41.68 rows=510 width=315) (actual time=0.044..0.050 rows=6 loops=1)

  • Merge Cond: (tt.id = stt.task_id)
5. 0.012 0.022 ↑ 127.5 4 1

Sort (cost=38.04..39.31 rows=510 width=130) (actual time=0.022..0.022 rows=4 loops=1)

  • Sort Key: tt.id
  • Sort Method: quicksort Memory: 25kB
6. 0.010 0.010 ↑ 127.5 4 1

Seq Scan on task_template tt (cost=0.00..15.10 rows=510 width=130) (actual time=0.007..0.010 rows=4 loops=1)

7. 0.008 0.019 ↑ 1.0 3 1

Sort (cost=1.05..1.06 rows=3 width=189) (actual time=0.018..0.019 rows=3 loops=1)

  • Sort Key: stt.task_id
  • Sort Method: quicksort Memory: 25kB
8. 0.011 0.011 ↑ 1.0 3 1

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

9.          

SubPlan (for Seq Scan)

10. 0.051 0.161 ↑ 1.0 1 1

Aggregate (cost=11.48..11.49 rows=1 width=32) (actual time=0.161..0.161 rows=1 loops=1)

11. 0.110 0.110 ↓ 1.3 4 1

CTE Scan on temp_table (cost=0.00..11.47 rows=3 width=162) (actual time=0.055..0.110 rows=4 loops=1)

  • Filter: (template_id = templates.id)
Planning time : 0.626 ms
Execution time : 0.284 ms