php - Magento : MySQL server crash when “Copying to tmp table” process runs -


we have around 8k products in our magento store. following query starts every 5 minutes , not seem end. have checked process chart , found query running many times. when mysql reaches allowed connection (200 concurrent connections allowed), crashed. happening in every hour , have restart mysql server.

i googled , didn't solution.

select`e`.* , if( at_status.value_id >0, at_status.value, at_status_default.value )as`status` , if( at_visibility.value_id >0, at_visibility.value, at_visibility_default.value )as`visibility` ,`at_price`.`value`as`price` ,`stock`.`qty` ,`stock`.`is_in_stock` ,`stock`.`manage_stock` ,`stock`.`use_config_manage_stock` ,`url`.`request_path` ,`categories`.* , group_concat( categories_index.category_id )as`categories_ids` ,`price_index`.`min_price` ,`price_index`.`max_price` ,`price_index`.`tier_price` ,`price_index`.`final_price`  from`catalog_product_entity`as`e`  innerjoin`catalog_product_website`as`product_website`on product_website.product_id = e.entity_id , product_website.website_id =\'2\' innerjoin`catalog_product_entity_int`as`at_status_default`on (`at_status_default`.`entity_id`=`e`.`entity_id`)  , (  `at_status_default`.`attribute_id`=\'87\' ) and`at_status_default`.`store_id`=0 leftjoin`catalog_product_entity_int`as`at_status`on (`at_status`.`entity_id`=`e`.`entity_id`)  , (  `at_status`.`attribute_id`=\'87\' ) , (  `at_status`.`store_id`=2 ) innerjoin`catalog_product_entity_int`as`at_visibility_default`on (`at_visibility_default`.`entity_id`=`e`.`entity_id`)  , (  `at_visibility_default`.`attribute_id`=\'93\' ) and`at_visibility_default`.`store_id`=0 leftjoin`catalog_product_entity_int`as`at_visibility`on (`at_visibility`.`entity_id`=`e`.`entity_id`)  , (  `at_visibility`.`attribute_id`=\'93\' ) , (  `at_visibility`.`store_id`=2 ) innerjoin`catalog_product_entity_decimal`as`at_price`on (`at_price`.`entity_id`=`e`.`entity_id`)  , (  `at_price`.`attribute_id`=\'67\' ) , (  `at_price`.`store_id`=0 ) leftjoin`cataloginventory_stock_item`as`stock`on stock.product_id = e.entity_id leftjoin`core_url_rewrite`as`url`on url.product_id = e.entity_id , url.category_id isnull  , is_system =1 , isnull( options )  , url.store_id =2 leftjoin`catalog_category_product`as`categories`on categories.product_id = e.entity_id innerjoin`catalog_category_product_index`as`categories_index`on categories_index.category_id = categories.category_id , categories_index.product_id = categories.product_id , categories_index.store_id =2 , categories_index.category_id in ( 3, 298, 299, 300, 301, 302, 306, 462, 463, 464, 465, 466, 467, 468, 469, 470, 303, 434, 435, 436, 441, 442, 443, 444, 445, 446, 304, 305, 480, 481, 482, 307, 309, 310, 311, 474, 313, 447, 448, 449, 418, 312, 419, 479, 314, 405, 406, 407, 408, 409, 315, 428, 438, 316, 415, 416, 417, 317, 402, 403, 404, 384, 385, 387, 388, 389, 390, 391, 430, 437, 439, 440, 308, 378, 379, 380, 381, 382, 458, 459, 383, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 450, 451, 497, 452, 454, 455, 456, 457, 460, 461, 318, 319, 420, 421, 422, 423, 320, 424, 425, 426, 427, 321, 322, 323, 364, 365, 366, 367, 473, 487, 488, 489, 490, 491, 492, 483, 484, 485, 486, 324, 325, 369, 370, 326, 453, 327, 328, 371, 372, 329, 376, 377, 330, 373, 374, 331, 332, 333, 334, 471, 335, 375, 337, 338, 336, 431, 432, 433, 339, 340, 341, 496, 342, 343, 344, 345, 346, 347, 348, 493, 495, 498, 499, 500, 502, 503, 349, 350, 351, 494, 501, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 410, 411, 412, 413, 414, 368, 475, 477, 478)  leftjoin`catalog_product_index_price`as`price_index`on price_index.entity_id = e.entity_id , customer_group_id =0 , price_index.website_id =2 ( if( at_status.value_id >0, at_status.value, at_status_default.value )=\'1\' ) , (  `e`.`type_id`  in (  \'simple\',\'configurable\',\'bundle\',\'grouped\',\'virtual\',\'downloadable\' )) , ( if( at_visibility.value_id >0, at_visibility.value, at_visibility_default.value )  in (  \'2\',\'3\',\'4\' )) , ( at_price.value >\'0\' ) , ( ( is_in_stock !=\'0\' or ( manage_stock !=\'1\' , use_config_manage_stock !=\'1\' ) or ( use_config_manage_stock !=\'0\' , 1=0 , is_in_stock =0 ))) groupby`e`.`entity_id` , `e`.`entity_id`  limit 1500 


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -