explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DgEW

Settings
# exclusive inclusive rows x rows loops node
1. 3.931 4.122 ↑ 12.0 1 1

Hash Join (cost=180.82..192.81 rows=12 width=1,041) (actual time=3.731..4.122 rows=1 loops=1)

  • Hash Cond: (phases.project_id = projects.id)
  • -> Seq Scan on projects projects_1 (cost=0.00..3.77 rows=77 width=223) (actual time=0.008..0
  • -> Seq Scan on phases phases_1 (cost=0.00..11.82 rows=482 width=84) (actual time=0.004..0.19
  • -> Seq Scan on work_orders work_orders_1 (cost=0.00..104.02 rows=2602 width=275) (actual tim
2.          

CTE work_orders

3. 0.859 3.916 ↑ 31.0 1 1

Hash Join (cost=58.71..70.47 rows=31 width=524) (actual time=3.526..3.916 rows=1 loops=1)

  • Hash Cond: (phases.id = work_orders.phase_id)
  • -> CTE Scan on phases (cost=0.00..9.64 rows=482 width=524) (actual time=0.005..0.650 row
4. 3.057 3.057 ↑ 13.0 1 1

Hash (cost=58.54..58.54 rows=13 width=4) (actual time=3.057..3.057 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
  • -> CTE Scan on work_orders (cost=0.00..58.54 rows=13 width=4) (actual time=3.054..
  • Filter: (id = 3013)
  • Rows Removed by Filter: 2601
5. 0.191 0.191 ↑ 1.0 77 1

Hash (cost=1.54..1.54 rows=77 width=521) (actual time=0.191..0.191 rows=77 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
  • -> CTE Scan on projects (cost=0.00..1.54 rows=77 width=521) (actual time=0.011..0.160 ro
Planning time : 0.223 ms
Execution time : 4.291 ms