Query is invalid
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "7588.41"
},
"ordering_operation": {
"using_filesort": false,
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "P",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"status",
"cscart_products_product_id_index",
"idx_status"
],
"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": "7K"
},
"used_columns": [
"product_id",
"product_code",
"product_type",
"status",
"company_id",
"amount",
"timestamp",
"updated_timestamp",
"guarantee_id",
"conditions",
"year",
"city_place",
"guarantees_crm",
"city_id",
"individual_meta_data",
"brand_id",
"uniqueSale",
"is_confiscated",
"type_of_sale"
]
}
},
{
"table": {
"table_name": "COM",
"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": "7K"
},
"used_columns": [
"company_id",
"status",
"company"
]
}
},
{
"table": {
"table_name": "B",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"impossible_on_condition": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "3K"
},
"used_columns": [
"brand_id",
"brand",
"has_subsidy"
]
}
},
{
"table": {
"table_name": "PC",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"link_type",
"pt",
"idx_pc_product_id_type"
],
"key": "pt",
"used_key_parts": [
"product_id",
"link_type"
],
"key_length": "6",
"ref": [
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.35",
"data_read_per_join": "16"
},
"used_columns": [
"product_id",
"category_id",
"link_type"
]
}
},
{
"table": {
"table_name": "CD",
"access_type": "ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"dev2.PC.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.70",
"data_read_per_join": "4K"
},
"used_columns": [
"category_id",
"category"
]
}
},
{
"table": {
"table_name": "PP",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id"
],
"key": "usergroup",
"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.28",
"eval_cost": "0.10",
"prefix_cost": "1.08",
"data_read_per_join": "248"
},
"used_columns": [
"product_id",
"price",
"currency",
"recycling_price_rub",
"discount_percent"
]
}
},
{
"table": {
"table_name": "PD",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"product_id"
],
"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.85",
"eval_cost": "0.10",
"prefix_cost": "2.03",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"lang_code",
"product",
"short_description",
"full_description",
"meta_keywords",
"meta_description",
"page_title",
"leasingCount",
"leasingPrice"
]
}
},
{
"table": {
"table_name": "CUR",
"access_type": "eq_ref",
"possible_keys": [
"currency_code"
],
"key": "currency_code",
"used_key_parts": [
"currency_code"
],
"key_length": "12",
"ref": [
"dev2.PP.currency"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "2.38",
"data_read_per_join": "96"
},
"used_columns": [
"currency_code",
"price"
]
}
},
{
"table": {
"table_name": "C",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"dev2.PC.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.62",
"eval_cost": "0.10",
"prefix_cost": "3.10",
"data_read_per_join": "10K"
},
"used_columns": [
"category_id",
"id_path",
"guarantee_id",
"status",
"services",
"guarantee_type"
]
}
},
{
"table": {
"table_name": "GW",
"access_type": "ALL",
"rows_examined_per_scan": 48,
"rows_produced_per_join": 48,
"filtered": "100.00",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "0.26",
"eval_cost": "4.80",
"prefix_cost": "8.15",
"data_read_per_join": "768"
},
"used_columns": [
"wishlist_id",
"product_id",
"guest_id"
],
"attached_condition": "<if>(is_not_null_compl(GW), ((`dev2`.`GW`.`guest_id` = 0) and (26725 = `dev2`.`GW`.`product_id`)), true)"
}
},
{
"table": {
"table_name": "GC",
"access_type": "ALL",
"rows_examined_per_scan": 88,
"rows_produced_per_join": 4224,
"filtered": "100.00",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "0.57",
"eval_cost": "422.40",
"prefix_cost": "431.12",
"data_read_per_join": "66K"
},
"used_columns": [
"compare_id",
"guest_id",
"product_id"
],
"attached_condition": "<if>(is_not_null_compl(GC), ((`dev2`.`GC`.`guest_id` = 0) and (26725 = `dev2`.`GC`.`product_id`)), true)"
}
},
{
"table": {
"table_name": "PST",
"access_type": "ref",
"possible_keys": [
"cscart_product_stocks_pk"
],
"key": "cscart_product_stocks_pk",
"used_key_parts": [
"product_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4224,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "2046.00",
"eval_cost": "422.40",
"prefix_cost": "2899.52",
"data_read_per_join": "99K"
},
"used_columns": [
"product_id",
"stock_id"
]
}
},
{
"table": {
"table_name": "CST",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"stock_id"
],
"key_length": "4",
"ref": [
"dev2.PST.stock_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4224,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "422.40",
"prefix_cost": "3322.17",
"data_read_per_join": "1M"
},
"used_columns": [
"stock_id",
"fias_id"
]
}
},
{
"table": {
"table_name": "CITY",
"access_type": "ref",
"possible_keys": [
"idx_custom_city_fias_id"
],
"key": "idx_custom_city_fias_id",
"used_key_parts": [
"fias_id"
],
"key_length": "386",
"ref": [
"dev2.CST.fias_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4224,
"filtered": "100.00",
"cost_info": {
"read_cost": "1056.00",
"eval_cost": "422.40",
"prefix_cost": "4800.57",
"data_read_per_join": "21M"
},
"used_columns": [
"city_id",
"address",
"fias_id"
]
}
},
{
"table": {
"table_name": "HP",
"access_type": "ref",
"possible_keys": [
"idx_hp_product_id"
],
"key": "idx_hp_product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4224,
"filtered": "100.00",
"cost_info": {
"read_cost": "2365.44",
"eval_cost": "422.40",
"prefix_cost": "7588.41",
"data_read_per_join": "990K"
},
"used_columns": [
"product_id",
"created_at"
]
}
}
],
"select_list_subqueries": [
{
"dependent": true,
"cacheable": false,
"query_block": {
"select_id": 2,
"cost_info": {
"query_cost": "0.58"
},
"table": {
"table_name": "cscart_product_stocks",
"access_type": "ref",
"possible_keys": [
"cscart_product_stocks_pk",
"product_stocks_company_stocks__fk"
],
"key": "cscart_product_stocks_pk",
"used_key_parts": [
"product_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.48",
"eval_cost": "0.10",
"prefix_cost": "0.58",
"data_read_per_join": "24"
},
"used_columns": [
"product_id"
],
"attached_condition": "(`dev2`.`cscart_product_stocks`.`product_id` = '26725')"
}
}
}
]
}
}
}
}