explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XYX6

Settings
# exclusive inclusive rows x rows loops node
1. 5.683 5.683 ↓ 1.2 942 1

Hash Join (cost=137.75..227.11 rows=804 width=1,041) (actual time=1.715..5.683 rows=942 loops=1)

  • Hash Cond: (work_orders.phase_id = phases.id)
  • -> Seq Scan on projects projects_1 (cost=0.00..3.77 rows=77 width=223) (actual time=0.003..0
  • -> Seq Scan on phases phases_1 (cost=0.00..11.82 rows=482 width=84) (actual time=0.006..0.21
  • -> Seq Scan on work_orders work_orders_1 (cost=0.00..104.02 rows=2602 width=275) (actual tim
  • -> CTE Scan on work_orders (cost=0.00..58.54 rows=867 width=4) (actual time=0.133..3.290 rows=
  • Filter: (id > 2013)
  • Rows Removed by Filter: 1660
2.          

CTE work_orders

3. 1.574 1.574 ↓ 2.6 482 1

Hash (cost=15.81..15.81 rows=186 width=1,041) (actual time=1.574..1.574 rows=482 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 27kB
  • -> Hash Join (cost=2.50..15.81 rows=186 width=1041) (actual time=0.180..1.281 rows=482 l
  • Hash Cond: (phases.project_id = projects.id)
  • -> CTE Scan on phases (cost=0.00..9.64 rows=482 width=524) (actual time=0.006..0.6
  • -> Hash (cost=1.54..1.54 rows=77 width=521) (actual time=0.161..0.161 rows=77 loop
  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
  • -> CTE Scan on projects (cost=0.00..1.54 rows=77 width=521) (actual time=0.0