explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ASck

Settings
# exclusive inclusive rows x rows loops node
1. 264.294 349.482 ↑ 12.7 519,020 1

Hash Left Join (cost=231.33..248,115.90 rows=6,609,720 width=210) (actual time=2.098..349.482 rows=519,020 loops=1)

  • Hash Cond: (COALESCE(rd.parent_contract_id, rd.contract_id) = pc.parent_contract_id)
2.          

CTE parent_contract

3. 1.069 1.069 ↑ 1.0 2,481 1

Seq Scan on crm_contracts cc (cost=0.00..148.55 rows=2,547 width=19) (actual time=0.006..1.069 rows=2,481 loops=1)

  • Filter: (kind = 1)
  • Rows Removed by Filter: 2368
4. 83.120 83.120 ↑ 1.0 519,020 1

Seq Scan on resident_days rd (cost=0.00..15,052.20 rows=519,020 width=170) (actual time=0.011..83.120 rows=519,020 loops=1)

5. 0.326 2.068 ↑ 1.0 2,481 1

Hash (cost=50.94..50.94 rows=2,547 width=40) (actual time=2.068..2.068 rows=2,481 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 162kB
6. 1.742 1.742 ↑ 1.0 2,481 1

CTE Scan on parent_contract pc (cost=0.00..50.94 rows=2,547 width=40) (actual time=0.008..1.742 rows=2,481 loops=1)

Planning time : 0.325 ms
Execution time : 371.301 ms