maping logic jan code

 avatar
unknown
mysql
4 years ago
7.3 kB
3
Indexable
"Sort  (cost=39703.65..39706.15 rows=1000 width=942) (actual time=2065.058..2068.546 rows=5970 loops=1)"
"  Sort Key: check_table.jan_code"
"  Sort Method: external merge  Disk: 3112kB"
"  Buffers: shared hit=118132 read=6305, temp read=389 written=390"
"  CTE check_table"
"    ->  CTE Scan on calculation_table  (cost=32317.82..32337.82 rows=1000 width=644) (actual time=109.513..1925.351 rows=5983 loops=1)"
"          Buffers: shared hit=94311 read=6189"
"          CTE calculation_table"
"            ->  CTE Scan on temp_table  (cost=32217.82..32317.82 rows=1000 width=644) (actual time=109.508..1912.567 rows=5983 loops=1)"
"                  Buffers: shared hit=94311 read=6189"
"                  CTE temp_table"
"                    ->  Nested Loop Left Join  (cost=3.38..32217.82 rows=1000 width=612) (actual time=109.485..1882.031 rows=5983 loops=1)"
"                          Buffers: shared hit=94311 read=6189"
"                          ->  Nested Loop Left Join  (cost=2.96..31599.87 rows=1000 width=612) (actual time=109.467..1872.692 rows=5983 loops=1)"
"                                Buffers: shared hit=94311 read=6189"
"                                ->  Nested Loop Left Join  (cost=2.54..24165.87 rows=1000 width=604) (actual time=109.449..1829.488 rows=5983 loops=1)"
"                                      Buffers: shared hit=76362 read=6189"
"                                      ->  Nested Loop Left Join  (cost=2.12..23547.91 rows=1000 width=604) (actual time=109.430..1820.695 rows=5983 loops=1)"
"                                            Buffers: shared hit=76362 read=6189"
"                                            ->  Nested Loop Left Join  (cost=1.69..16113.91 rows=1000 width=596) (actual time=109.411..1776.620 rows=5983 loops=1)"
"                                                  Buffers: shared hit=58418 read=6183"
"                                                  ->  Nested Loop Left Join  (cost=1.27..15495.96 rows=1000 width=596) (actual time=109.405..1766.946 rows=5983 loops=1)"
"                                                        Buffers: shared hit=58418 read=6183"
"                                                        ->  Nested Loop Left Join  (cost=0.85..8061.96 rows=1000 width=588) (actual time=109.376..1713.147 rows=5983 loops=1)"
"                                                              Buffers: shared hit=40471 read=6181"
"                                                              ->  Nested Loop Left Join  (cost=0.43..7444.00 rows=1000 width=588) (actual time=109.359..871.347 rows=5983 loops=1)"
"                                                                    Buffers: shared hit=20751 read=2978"
"                                                                    ->  Function Scan on dblink rows  (cost=0.01..10.01 rows=1000 width=580) (actual time=108.649..110.740 rows=5983 loops=1)"
"                                                                          Buffers: shared read=1"
"                                                                    ->  Index Scan using master_maruetsu_product_jan_jan_jan_type_key on master_maruetsu_product_jan jan_from_33  (cost=0.42..7.42 rows=1 width=22) (actual time=0.124..0.125 rows=1 loops=5983)"
"                                                                          Index Cond: ((jan)::text = (rows.no_33)::text)"
"                                                                          Buffers: shared hit=20751 read=2977"
"                                                              ->  Index Only Scan using maruetsu_data_product_product_code_key on maruetsu_data_product pp_from_33  (cost=0.42..0.62 rows=1 width=8) (actual time=0.138..0.138 rows=1 loops=5983)"
"                                                                    Index Cond: (product_code = (jan_from_33.product_code)::text)"
"                                                                    Heap Fetches: 5727"
"                                                                    Buffers: shared hit=19720 read=3203"
"                                                        ->  Index Scan using master_maruetsu_product_jan_jan_jan_type_key on master_maruetsu_product_jan jan_from_upc1  (cost=0.42..7.42 rows=1 width=22) (actual time=0.007..0.007 rows=0 loops=5983)"
"                                                              Index Cond: ((jan)::text = (rows.code_upc1)::text)"
"                                                              Buffers: shared hit=17947 read=2"
"                                                  ->  Index Only Scan using maruetsu_data_product_product_code_key on maruetsu_data_product pp_from_upc1  (cost=0.42..0.62 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=5983)"
"                                                        Index Cond: (product_code = (jan_from_upc1.product_code)::text)"
"                                                        Heap Fetches: 0"
"                                            ->  Index Scan using master_maruetsu_product_jan_jan_jan_type_key on master_maruetsu_product_jan jan_from_upc2  (cost=0.42..7.42 rows=1 width=22) (actual time=0.006..0.006 rows=0 loops=5983)"
"                                                  Index Cond: ((jan)::text = (rows.code_upc2)::text)"
"                                                  Buffers: shared hit=17944 read=6"
"                                      ->  Index Only Scan using maruetsu_data_product_product_code_key on maruetsu_data_product pp_from_upc2  (cost=0.42..0.62 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=5983)"
"                                            Index Cond: (product_code = (jan_from_upc2.product_code)::text)"
"                                            Heap Fetches: 0"
"                                ->  Index Scan using master_maruetsu_product_jan_jan_jan_type_key on master_maruetsu_product_jan jan_from_upc3  (cost=0.42..7.42 rows=1 width=22) (actual time=0.006..0.006 rows=0 loops=5983)"
"                                      Index Cond: ((jan)::text = (rows.code_upc3)::text)"
"                                      Buffers: shared hit=17949"
"                          ->  Index Only Scan using maruetsu_data_product_product_code_key on maruetsu_data_product pp_from_upc3  (cost=0.42..0.62 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=5983)"
"                                Index Cond: (product_code = (jan_from_upc3.product_code)::text)"
"                                Heap Fetches: 0"
"  ->  Nested Loop  (cost=0.42..7316.00 rows=1000 width=942) (actual time=113.790..2028.061 rows=5970 loops=1)"
"        Buffers: shared hit=118129 read=6305"
"        ->  CTE Scan on check_table  (cost=0.00..20.00 rows=1000 width=644) (actual time=109.515..1930.664 rows=5983 loops=1)"
"              Buffers: shared hit=94311 read=6189"
"        ->  Index Scan using maruetsu_data_product_product_code_key on maruetsu_data_product pp  (cost=0.42..7.30 rows=1 width=298) (actual time=0.013..0.013 rows=1 loops=5983)"
"              Index Cond: ((product_code)::text = (check_table.product_code_from_else_if_condition)::text)"
"              Filter: (product_id IS NOT NULL)"
"              Buffers: shared hit=23818 read=116"
"Planning Time: 7.837 ms"
"Execution Time: 2074.368 ms"
Editor is loading...