Query time 0.00384
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "73.31"
},
"ordering_operation": {
"using_filesort": false,
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "products",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"status",
"idx_products_status_company",
"idx_products_inventory",
"idx_products_status_company_master",
"idx_products_main_query",
"idx_products_composite_query"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "5K"
},
"used_columns": [
"product_id",
"kl_erp_inventory_id",
"product_type",
"status",
"company_id",
"amount",
"kl_enable_qc",
"kl_qc_amount",
"tracking",
"parent_product_id",
"master_product_id",
"master_product_status",
"master_product_offers_count"
]
}
},
{
"table": {
"table_name": "descr1",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"product_id",
"idx_product_desc_lang",
"idx_product_name_search",
"idx_product_desc_sort"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code"
],
"key_length": "9",
"ref": [
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"table": {
"table_name": "companies",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "range",
"possible_keys": [
"idx_products_categories_composite"
],
"key": "idx_products_categories_composite",
"used_key_parts": [
"product_id",
"category_id"
],
"key_length": "6",
"rows_examined_per_scan": 87,
"rows_produced_per_join": 87,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "9.21",
"eval_cost": "8.70",
"prefix_cost": "17.91",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"category_id"
],
"attached_condition": "((`cscart_db`.`products_categories`.`product_id` = 65426) and (`cscart_db`.`products_categories`.`category_id` in (277,281,290,296,458,508,620,782,1186,2215,2438,2453,2463,2473,2488,2494,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2913,2973,2974,3020,3055,3070,3078,3093,3094,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3114,3152,3161,3162,3163,3173)))"
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"p_category_id",
"idx_categories_storefront_status",
"idx_categories_usergroup_status",
"idx_categories_status_id_path"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"cscart_db.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 71,
"filtered": "81.96",
"cost_info": {
"read_cost": "21.75",
"eval_cost": "7.13",
"prefix_cost": "48.36",
"data_read_per_join": "199K"
},
"used_columns": [
"category_id",
"status",
"storefront_id"
],
"attached_condition": "((`cscart_db`.`cscart_categories`.`status` in ('A','H')) and (`cscart_db`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "cscart_product_sales",
"access_type": "ref",
"possible_keys": [
"idx_product_sales_category_amount"
],
"key": "idx_product_sales_category_amount",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"cscart_db.products_categories.category_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 71,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "17.83",
"eval_cost": "7.13",
"prefix_cost": "73.31",
"data_read_per_join": "1K"
},
"used_columns": [
"category_id",
"product_id",
"amount"
]
}
}
]
}
}
}
}