explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GOBR : 2

Settings
# exclusive inclusive rows x rows loops node
1. 37.910 13,182.205 ↑ 14.3 86 1

HashAggregate (cost=6,216.08..6,231.45 rows=1,230 width=960) (actual time=13,182.174..13,182.205 rows=86 loops=1)

  • Group Key: pff.site_id_, fi.facility_code_, abcinfo.abc_type_, procatsettingm.category_code_, procatsettingm.description_, procatsettingl.category_code_, procatsettingl.description_
2. 9,541.112 13,144.295 ↓ 3.6 4,368 1

Nested Loop Left Join (cost=271.27..6,182.25 rows=1,230 width=960) (actual time=121.504..13,144.295 rows=4,368 loops=1)

  • Join Filter: (((product_cost.site_id_)::text = (pff.site_id_)::text) AND ((pff.product_id_)::text = (product_cost.product_id_)::text))
  • Rows Removed by Join Filter: 35720626
3. 12.340 641.679 ↓ 3.6 4,368 1

Hash Left Join (cost=270.85..6,152.29 rows=1,230 width=1,038) (actual time=47.779..641.679 rows=4,368 loops=1)

  • Hash Cond: ((proabc.abc_id_)::text = (abcinfo.abc_id_)::text)
4. 11.153 615.764 ↓ 3.6 4,368 1

Merge Left Join (cost=14.89..5,879.42 rows=1,230 width=1,120) (actual time=33.830..615.764 rows=4,368 loops=1)

  • Merge Cond: ((pff.facility_id_)::text = (fi.facility_id_)::text)
5. 12.578 603.236 ↓ 3.6 4,368 1

Nested Loop Left Join (cost=14.75..5,853.77 rows=1,230 width=1,180) (actual time=33.540..603.236 rows=4,368 loops=1)

6. 4.852 402.834 ↓ 60.7 4,368 1

Nested Loop Left Join (cost=9.98..684.05 rows=72 width=1,082) (actual time=33.069..402.834 rows=4,368 loops=1)

7. 11.170 380.510 ↓ 60.7 4,368 1

Nested Loop Left Join (cost=9.71..656.71 rows=72 width=1,044) (actual time=33.028..380.510 rows=4,368 loops=1)

8. 10.781 343.132 ↓ 161.8 4,368 1

Nested Loop Left Join (cost=5.27..217.62 rows=27 width=946) (actual time=32.968..343.132 rows=4,368 loops=1)

9. 26.185 310.511 ↓ 161.8 4,368 1

Nested Loop Left Join (cost=5.00..207.37 rows=27 width=908) (actual time=32.887..310.511 rows=4,368 loops=1)

10. 44.086 44.086 ↓ 436.8 4,368 1

Index Scan using product_facility_feature_idx01 on product_facility_feature pff (cost=0.55..44.75 rows=10 width=810) (actual time=0.712..44.086 rows=4,368 loops=1)

  • Index Cond: (((site_id_)::text = 'AA101'::text) AND ((product_feature_category_id_)::text = 'PARTSAVERAGEDEMAND'::text))
11. 117.936 240.240 ↑ 3.0 1 4,368

Bitmap Heap Scan on product_category_info procatl (cost=4.45..16.23 rows=3 width=196) (actual time=0.055..0.055 rows=1 loops=4,368)

  • Recheck Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTLARGEGROUP'::text))
  • Heap Blocks: exact=4368
12. 122.304 122.304 ↑ 3.0 1 4,368

Bitmap Index Scan on product_category_info_idx01 (cost=0.00..4.45 rows=3 width=0) (actual time=0.028..0.028 rows=1 loops=4,368)

  • Index Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTLARGEGROUP'::text))
13. 21.840 21.840 ↑ 1.0 1 4,368

Index Scan using pk_product_category on product_category_setting procatsettingl (cost=0.27..0.37 rows=1 width=234) (actual time=0.005..0.005 rows=1 loops=4,368)

  • Index Cond: ((procatl.product_category_id_)::text = (product_category_id_)::text)
14. 4.368 26.208 ↑ 3.0 1 4,368

Bitmap Heap Scan on product_category_info procatm (cost=4.45..16.23 rows=3 width=196) (actual time=0.006..0.006 rows=1 loops=4,368)

  • Recheck Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTMIDDLEGROUP'::text))
  • Heap Blocks: exact=4368
15. 21.840 21.840 ↑ 3.0 1 4,368

Bitmap Index Scan on product_category_info_idx01 (cost=0.00..4.45 rows=3 width=0) (actual time=0.005..0.005 rows=1 loops=4,368)

  • Index Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTMIDDLEGROUP'::text))
16. 17.472 17.472 ↑ 1.0 1 4,368

Index Scan using pk_product_category on product_category_setting procatsettingm (cost=0.27..0.37 rows=1 width=234) (actual time=0.002..0.004 rows=1 loops=4,368)

  • Index Cond: ((procatm.product_category_id_)::text = (product_category_id_)::text)
17. 65.520 187.824 ↑ 17.0 1 4,368

Bitmap Heap Scan on product_abc_info proabc (cost=4.77..71.63 rows=17 width=294) (actual time=0.042..0.043 rows=1 loops=4,368)

  • Recheck Cond: (((site_id_)::text = (pff.site_id_)::text) AND ((site_id_)::text = 'AA101'::text) AND ((product_id_)::text = (pff.product_id_)::text))
  • Heap Blocks: exact=4368
18. 122.304 122.304 ↑ 17.0 1 4,368

Bitmap Index Scan on product_abc_info_idx01 (cost=0.00..4.76 rows=17 width=0) (actual time=0.028..0.028 rows=1 loops=4,368)

  • Index Cond: (((site_id_)::text = (pff.site_id_)::text) AND ((site_id_)::text = 'AA101'::text) AND ((product_id_)::text = (pff.product_id_)::text))
19. 1.193 1.375 ↓ 73.7 4,422 1

Materialize (cost=0.14..17.19 rows=60 width=136) (actual time=0.143..1.375 rows=4,422 loops=1)

20. 0.182 0.182 ↑ 1.1 55 1

Index Scan using pk_facility_info on facility_info fi (cost=0.14..17.04 rows=60 width=136) (actual time=0.107..0.182 rows=55 loops=1)

21. 6.509 13.575 ↑ 1.0 5,376 1

Hash (cost=188.76..188.76 rows=5,376 width=114) (actual time=13.575..13.575 rows=5,376 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 406kB
22. 7.066 7.066 ↑ 1.0 5,376 1

Seq Scan on abc_definition_info abcinfo (cost=0.00..188.76 rows=5,376 width=114) (actual time=0.053..7.066 rows=5,376 loops=1)

23. 2,906.915 2,961.504 ↓ 8,178.0 8,178 4,368

Materialize (cost=0.41..8.44 rows=1 width=216) (actual time=0.000..0.678 rows=8,178 loops=4,368)

24. 54.589 54.589 ↓ 8,178.0 8,178 1

Index Scan using product_cost_idx04 on product_cost (cost=0.41..8.43 rows=1 width=216) (actual time=0.454..54.589 rows=8,178 loops=1)

  • Index Cond: (((site_id_)::text = 'AA101'::text) AND ((product_cost_component_category_id_)::text = 'C034AVERAGECOST'::text))