explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f8eT

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop (cost=233.3..5,345.19 rows=1 width=198) (never executed)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=233.3..2,130.73 rows=1 width=152) (never executed)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=232.89..2,128.07 rows=1 width=156) (never executed)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=232.6..2,127.26 rows=2 width=172) (never executed)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=232.34..2,125.88 rows=3 width=188) (never executed)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=232.2..2,125.4 rows=3 width=172) (never executed)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=231.93..2,124.4 rows=3 width=180) (never executed)

8. 0.000 0.000 ↓ 0.0

Hash Join (cost=231.65..2,123.36 rows=3 width=196) (never executed)

9. 0.000 0.000 ↓ 0.0

Seq Scan on _sales_raw s (cost=0..1,704.41 rows=41,069 width=116) (never executed)

  • Filter: (s.redistributor_company_id IS NOT NULL)
10. 0.000 0.000 ↓ 0.0

Hash (cost=230.62..230.62 rows=82 width=110) (never executed)

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=208.86..230.62 rows=82 width=110) (never executed)

12. 0.000 0.000 ↓ 0.0

HashAggregate (cost=126.68..140.84 rows=1,416 width=32) (never executed)

  • Group Key: cagg.contract_family_id, cagg.company_id
13. 0.000 0.000 ↓ 0.0

Seq Scan on _contractee_agg cagg (cost=0..98.45 rows=5,645 width=32) (never executed)

14. 0.000 0.000 ↓ 0.0

Hash (cost=79.63..79.63 rows=205 width=78) (never executed)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=35.23..79.63 rows=205 width=78) (never executed)

16. 0.000 0.000 ↓ 0.0

Hash Join (cost=20.54..61.2 rows=550 width=62) (never executed)

17. 0.000 0.000 ↓ 0.0

Seq Scan on contract_renew_version crv (cost=0..29.94 rows=1,394 width=46) (never executed)

18. 0.000 0.000 ↓ 0.0

Hash (cost=14.27..14.27 rows=501 width=16) (never executed)

19. 0.000 0.000 ↓ 0.0

HashAggregate (cost=9.26..14.27 rows=501 width=16) (never executed)

  • Group Key: xcf.contract_family_id
20. 0.000 0.000 ↓ 0.0

Seq Scan on _contract_family xcf (cost=0..8.01 rows=501 width=16) (never executed)

21. 0.000 0.000 ↓ 0.0

Hash (cost=8.2..8.2 rows=520 width=16) (never executed)

22. 0.000 0.000 ↓ 0.0

Seq Scan on _contract_renew_version xcrv (cost=0..8.2 rows=520 width=16) (never executed)

23. 0.000 0.000 ↓ 0.0

Index Scan using contract_amend_version_contract_renew_version_id_idx on contract_amend_version cav (cost=0.28..0.35 rows=1 width=32) (never executed)

  • Index Cond: (cav.contract_renew_version_id = crv.contract_renew_version_id)
24. 0.000 0.000 ↓ 0.0

Index Scan using contract_family_pkey on contract_family cf (cost=0.28..0.33 rows=1 width=40) (never executed)

  • Index Cond: (cf.contract_family_id = crv.contract_family_id)
25. 0.000 0.000 ↓ 0.0

Index Scan using grouping_company_parent_pkey on grouping_company_parent gcp (cost=0.14..0.16 rows=1 width=32) (never executed)

  • Index Cond: (gcp.grouping_id = cf.contractee_grouping_id)
26. 0.000 0.000 ↓ 0.0

Index Scan using grouping_company_pkey on grouping_company gc (cost=0.27..0.41 rows=1 width=16) (never executed)

  • Index Cond: (gc.grouping_id = cf.contractee_grouping_id)
  • Filter: (gc.grouping_company_type = 'BUYING_GROUP'::enum.grouping_company_type)
27. 0.000 0.000 ↓ 0.0

Index Scan using ix_tmp_contractee_agg_company on _contractee_agg xx (cost=0.28..0.35 rows=4 width=32) (never executed)

  • Index Cond: (xx.company_id = s.redistributor_company_id)
28. 0.000 0.000 ↓ 0.0

Index Scan using contract_product_materialized_pkey on contract_product_materialized contract_product_materialized (cost=0.42..2.64 rows=1 width=52) (never executed)

  • Index Cond: ((contract_product_materialized.contract_id = cav.contract_amend_version_id) AND (contract_product_materialized.product_id = s.product_id))
29. 0.000 0.000 ↓ 0.0

Seq Scan on _sales_potential_earnings x (cost=0..2,228.98 rows=65,698 width=32) (never executed)

Planning time : 81.176 ms