explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EdNu

Settings
# exclusive inclusive rows x rows loops node
1. 106.509 1,496.595 ↓ 55,691.7 167,075 1

Nested Loop (cost=189.31..28,950.03 rows=3 width=205) (actual time=7.925..1,496.595 rows=167,075 loops=1)

  • Buffers: shared hit=827338 read=277, local hit=167086 read=13628
2. 125.679 1,390.086 ↓ 41,768.8 167,075 1

Nested Loop (cost=189.16..28,949.31 rows=4 width=157) (actual time=7.908..1,390.086 rows=167,075 loops=1)

  • Buffers: shared hit=827338 read=277, local hit=11 read=13628
3. 65.422 830.595 ↓ 16,685.1 216,906 1

Hash Join (cost=188.74..28,906.96 rows=13 width=161) (actual time=6.479..830.595 rows=216,906 loops=1)

  • Buffers: local hit=11 read=13628
4. 396.140 762.532 ↓ 16,685.1 216,906 1

Hash Join (cost=108.98..28,827.02 rows=13 width=161) (actual time=3.787..762.532 rows=216,906 loops=1)

  • Buffers: local hit=11 read=13608
5. 204.391 363.409 ↓ 157.0 1,009,732 1

Hash Join (cost=24.21..28,479.46 rows=6,432 width=145) (actual time=0.773..363.409 rows=1,009,732 loops=1)

  • Buffers: local hit=11 read=13583
6. 158.290 158.290 ↓ 1.0 193,501 1

Seq Scan on t_sales_raw s (cost=0..20,658.21 rows=193,318 width=121) (actual time=0.023..158.29 rows=193,501 loops=1)

  • Filter: (s.company_grouping_id IS NOT NULL)
  • Buffers: local read=13583
7. 0.022 0.728 ↑ 1.0 30 1

Hash (cost=23.84..23.84 rows=30 width=56) (actual time=0.728..0.728 rows=30 loops=1)

  • Buffers: local hit=11
8. 0.706 0.706 ↑ 1.0 30 1

Seq Scan on t_contract_family cf (cost=0..23.84 rows=30 width=56) (actual time=0.064..0.706 rows=30 loops=1)

  • Filter: (cf.parent_company_id IS NOT NULL)
  • Buffers: local hit=11
9. 1.676 2.983 ↑ 1.0 2,656 1

Hash (cost=51.56..51.56 rows=2,656 width=46) (actual time=2.983..2.983 rows=2,656 loops=1)

  • Buffers: local read=25
10. 1.307 1.307 ↑ 1.0 2,656 1

Seq Scan on t_contract_renew_version crv (cost=0..51.56 rows=2,656 width=46) (actual time=0.041..1.307 rows=2,656 loops=1)

  • Buffers: local read=25
11. 1.356 2.641 ↑ 1.0 2,656 1

Hash (cost=46.56..46.56 rows=2,656 width=32) (actual time=2.641..2.641 rows=2,656 loops=1)

  • Buffers: local read=20
12. 1.285 1.285 ↑ 1.0 2,656 1

Seq Scan on t_contract_amend_version cav (cost=0..46.56 rows=2,656 width=32) (actual time=0.076..1.285 rows=2,656 loops=1)

  • Buffers: local read=20
13. 433.812 433.812 ↑ 1.0 1 216,906

Index Scan using contract_product_materialized_pkey on contract_product_materialized contract_product_materialized (cost=0.42..3.24 rows=1 width=52) (actual time=0.002..0.002 rows=1 loops=216,906)

  • Index Cond: ((contract_product_materialized.contract_id = cav.contract_amend_version_id) AND (contract_product_materialized.product_id = s.product_id))
  • Buffers: shared hit=827338 read=277
14. 0.000 0.000 ↓ 0.0 0 167,075

Index Only Scan using idx_spe_unique on t_sales_potential_earnings x (cost=0.14..0.16 rows=1 width=32) (actual time=0..0 rows=0 loops=167,075)

  • Index Cond: (x.contract_item_id = contract_product_materialized.contract_item_id)
  • Buffers: local hit=167075
Planning time : 5.053 ms
Execution time : 1,508.279 ms