Query time 0.00095
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "10.89"
},
"nested_loop": [
{
"table": {
"table_name": "variation_group_products",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "3",
"rows_examined_per_scan": 12,
"rows_produced_per_join": 12,
"filtered": "100.00",
"index_condition": "(`cscart_db`.`variation_group_products`.`group_id` in (611,613))",
"cost_info": {
"read_cost": "4.71",
"eval_cost": "1.20",
"prefix_cost": "5.91",
"data_read_per_join": "192"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "3.00",
"eval_cost": "0.06",
"prefix_cost": "10.11",
"data_read_per_join": "3K"
},
"used_columns": [
"product_id",
"status",
"company_id",
"usergroup_ids",
"master_product_status"
],
"attached_condition": "((`cscart_db`.`products`.`company_id` in (13,0)) and ((`cscart_db`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscart_db`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscart_db`.`products`.`usergroup_ids`))) and (`cscart_db`.`products`.`status` = 'A') and (`cscart_db`.`products`.`master_product_status` = 'A'))"
}
},
{
"table": {
"table_name": "cscart_supplier_links",
"access_type": "ref",
"possible_keys": [
"object_id"
],
"key": "object_id",
"used_key_parts": [
"object_id",
"object_type"
],
"key_length": "7",
"ref": [
"cscart_db.variation_group_products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.15",
"eval_cost": "0.06",
"prefix_cost": "10.32",
"data_read_per_join": "9"
},
"used_columns": [
"object_id",
"object_type"
],
"attached_condition": "<if>(is_not_null_compl(cscart_supplier_links), (`cscart_db`.`cscart_supplier_links`.`object_id` = `cscart_db`.`variation_group_products`.`product_id`), true)"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscart_db.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.26",
"eval_cost": "0.06",
"prefix_cost": "10.64",
"data_read_per_join": "10"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"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": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.16",
"eval_cost": "0.00",
"prefix_cost": "10.86",
"data_read_per_join": "92"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "(((`cscart_db`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscart_db`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscart_db`.`cscart_categories`.`usergroup_ids`))) and (`cscart_db`.`cscart_categories`.`status` in ('A','H')) and (`cscart_db`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code"
],
"key_length": "9",
"ref": [
"cscart_db.variation_group_products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.00",
"prefix_cost": "10.88",
"data_read_per_join": "150"
},
"used_columns": [
"product_id",
"lang_code"
]
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"cscart_db.products.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.01",
"eval_cost": "0.00",
"prefix_cost": "10.90",
"data_read_per_join": "229"
},
"used_columns": [
"company_id",
"status"
],
"attached_condition": "<if>(found_match(companies), ((`cscart_db`.`companies`.`status` = 'A') or (`cscart_db`.`products`.`company_id` = 0)), true)"
}
}
]
}
}