explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hinj : 2

Settings
# exclusive inclusive rows x rows loops node
1. 5.766 240.817 ↑ 2.0 59 1

HashAggregate (cost=736.31..737.81 rows=120 width=960) (actual time=240.779..240.817 rows=59 loops=1)

  • Group Key: pff.site_id_, fi.facility_code_, abcinfo.abc_type_, procatsettingm.category_code_, procatsettingm.description_, procatsettingl.category_code_, procatsettingl.description_
2. 2.245 235.051 ↓ 7.3 878 1

Hash Left Join (cost=26.43..733.01 rows=120 width=960) (actual time=0.797..235.051 rows=878 loops=1)

  • Hash Cond: ((procatm.product_category_id_)::text = (procatsettingm.product_category_id_)::text)
3. 1.937 232.453 ↓ 7.3 878 1

Nested Loop Left Join (cost=15.32..720.26 rows=120 width=922) (actual time=0.409..232.453 rows=878 loops=1)

4. 2.839 224.370 ↓ 7.3 878 1

Nested Loop Left Join (cost=15.04..659.38 rows=120 width=1,004) (actual time=0.365..224.370 rows=878 loops=1)

5. 2.884 179.387 ↓ 109.8 878 1

Nested Loop Left Join (cost=10.27..84.97 rows=8 width=1,004) (actual time=0.307..179.387 rows=878 loops=1)

6. 1.618 169.479 ↓ 292.7 878 1

Nested Loop Left Join (cost=5.82..36.18 rows=3 width=906) (actual time=0.290..169.479 rows=878 loops=1)

7. 4.062 162.593 ↓ 292.7 878 1

Nested Loop Left Join (cost=5.55..35.04 rows=3 width=868) (actual time=0.266..162.593 rows=878 loops=1)

8. 2.004 141.849 ↓ 878.0 878 1

Nested Loop Left Join (cost=1.10..18.78 rows=1 width=770) (actual time=0.221..141.849 rows=878 loops=1)

9. 17.671 135.455 ↓ 878.0 878 1

Nested Loop (cost=0.96..17.01 rows=1 width=830) (actual time=0.193..135.455 rows=878 loops=1)

10. 19.648 19.648 ↓ 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.121..19.648 rows=8,178 loops=1)

  • Index Cond: (((site_id_)::text = 'AA101'::text) AND ((product_cost_component_category_id_)::text = 'C034AVERAGECOST'::text))
11. 98.136 98.136 ↓ 0.0 0 8,178

Index Scan using product_facility_feature_idx02 on product_facility_feature pff (cost=0.55..8.57 rows=1 width=810) (actual time=0.012..0.012 rows=0 loops=8,178)

  • Index Cond: (((product_id_)::text = (product_cost.product_id_)::text) AND ((site_id_)::text = 'AA101'::text) AND ((product_feature_category_id_)::text = 'PARTSAVERAGEDEMAND'::text))
12. 4.390 4.390 ↑ 1.0 1 878

Index Scan using pk_facility_info on facility_info fi (cost=0.14..1.76 rows=1 width=136) (actual time=0.005..0.005 rows=1 loops=878)

  • Index Cond: ((facility_id_)::text = (pff.facility_id_)::text)
13. 5.268 16.682 ↑ 3.0 1 878

Bitmap Heap Scan on product_category_info procatl (cost=4.45..16.23 rows=3 width=196) (actual time=0.019..0.019 rows=1 loops=878)

  • Recheck Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTLARGEGROUP'::text))
  • Heap Blocks: exact=878
14. 11.414 11.414 ↑ 3.0 1 878

Bitmap Index Scan on product_category_info_idx01 (cost=0.00..4.45 rows=3 width=0) (actual time=0.013..0.013 rows=1 loops=878)

  • Index Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTLARGEGROUP'::text))
15. 5.268 5.268 ↑ 1.0 1 878

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.006 rows=1 loops=878)

  • Index Cond: ((procatl.product_category_id_)::text = (product_category_id_)::text)
16. 1.756 7.024 ↑ 3.0 1 878

Bitmap Heap Scan on product_category_info procatm (cost=4.45..16.23 rows=3 width=196) (actual time=0.008..0.008 rows=1 loops=878)

  • Recheck Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTMIDDLEGROUP'::text))
  • Heap Blocks: exact=878
17. 5.268 5.268 ↑ 3.0 1 878

Bitmap Index Scan on product_category_info_idx01 (cost=0.00..4.45 rows=3 width=0) (actual time=0.006..0.006 rows=1 loops=878)

  • Index Cond: (((pff.product_id_)::text = (product_id_)::text) AND ((product_category_type_id_)::text = 'PARTMIDDLEGROUP'::text))
18. 5.268 42.144 ↑ 17.0 1 878

Bitmap Heap Scan on product_abc_info proabc (cost=4.77..71.63 rows=17 width=294) (actual time=0.048..0.048 rows=1 loops=878)

  • 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=878
19. 36.876 36.876 ↑ 17.0 1 878

Bitmap Index Scan on product_abc_info_idx01 (cost=0.00..4.76 rows=17 width=0) (actual time=0.042..0.042 rows=1 loops=878)

  • Index Cond: (((site_id_)::text = (pff.site_id_)::text) AND ((site_id_)::text = 'AA101'::text) AND ((product_id_)::text = (pff.product_id_)::text))
20. 6.146 6.146 ↑ 1.0 1 878

Index Scan using pk_abc_definition_info on abc_definition_info abcinfo (cost=0.28..0.50 rows=1 width=114) (actual time=0.006..0.007 rows=1 loops=878)

  • Index Cond: ((abc_id_)::text = (proabc.abc_id_)::text)
21. 0.178 0.353 ↓ 1.0 238 1

Hash (cost=8.27..8.27 rows=227 width=234) (actual time=0.353..0.353 rows=238 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 28kB
22. 0.175 0.175 ↓ 1.0 238 1

Seq Scan on product_category_setting procatsettingm (cost=0.00..8.27 rows=227 width=234) (actual time=0.006..0.175 rows=238 loops=1)