Query time 0.00218
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "139.19"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "system",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.20",
"prefix_cost": "0.00",
"data_read_per_join": "5K"
},
"used_columns": [
"company_id",
"status",
"company"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 56,
"rows_produced_per_join": 1,
"filtered": "3.19",
"index_condition": "(`ea201_diorama`.`products`.`product_id` in (29915,29914,29912,29911,29924,35814,29910,29909,29903,29901,29900,29904,29905,29907,29906,29925,29926,29943,29942,29944,29946,29948,29947,29938,29931,29928,29927,29933,29899,29898,29863,29861,29854,29864,29865,29869,29868,29867,29866,29852,29845,34633,29870,29891,29893,29882,29881,29875,29874,29873,29872,29876,29877,29880,29878,29779))",
"cost_info": {
"read_cost": "134.05",
"eval_cost": "0.36",
"prefix_cost": "134.41",
"data_read_per_join": "6K"
},
"used_columns": [
"product_id",
"status",
"amount",
"timestamp",
"tracking",
"company_id",
"usergroup_ids"
],
"attached_condition": "((`ea201_diorama`.`products`.`company_id` = '1') and ((`ea201_diorama`.`products`.`amount` > 0) or (`ea201_diorama`.`products`.`tracking` = 'D')) and ((`ea201_diorama`.`products`.`usergroup_ids` = '') or find_in_set(0,`ea201_diorama`.`products`.`usergroup_ids`) or find_in_set(1,`ea201_diorama`.`products`.`usergroup_ids`)) and (`ea201_diorama`.`products`.`status` = 'A'))"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"membership",
"src_k",
"product_id",
"lower_limit",
"membership_id"
],
"key": "membership",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"ea201_diorama.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "29.84",
"using_index": true,
"cost_info": {
"read_cost": "1.79",
"eval_cost": "0.11",
"prefix_cost": "136.56",
"data_read_per_join": "12"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`ea201_diorama`.`prices`.`lower_limit` = 1) and (`ea201_diorama`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"ea201_diorama.products.product_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.07",
"eval_cost": "0.21",
"prefix_cost": "137.84",
"data_read_per_join": "17"
},
"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": [
"ea201_diorama.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "1.07",
"eval_cost": "0.01",
"prefix_cost": "139.12",
"data_read_per_join": "142"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "(((`ea201_diorama`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`ea201_diorama`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`ea201_diorama`.`cscart_categories`.`usergroup_ids`)) and (`ea201_diorama`.`cscart_categories`.`status` in ('A','H')) and (`ea201_diorama`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "shared_descr",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id",
"company_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code",
"company_id"
],
"key_length": "13",
"ref": [
"ea201_diorama.products.product_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.01",
"prefix_cost": "139.16",
"data_read_per_join": "208"
},
"used_columns": [
"product_id",
"lang_code",
"company_id",
"product"
]
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code"
],
"key_length": "9",
"ref": [
"ea201_diorama.products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.01",
"prefix_cost": "139.19",
"data_read_per_join": "208"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
29906 |
Noch 15730 - Cerfs 1:87 |
Diorama.fr / NEORAMA sarl |
29910 |
Noch 15748 - Berger et moutons 1:87 |
Diorama.fr / NEORAMA sarl |
29909 |
Noch 15745 - Animaux des bois 1:87 |
Diorama.fr / NEORAMA sarl |
29873 |
Noch 36722 - Vaches brunes 1:160 |
Diorama.fr / NEORAMA sarl |
29911 |
Noch 15761 - Chevaux 1:87 |
Diorama.fr / NEORAMA sarl |
29872 |
Noch 36721 - Vaches noires et blanches 1:160 |
Diorama.fr / NEORAMA sarl |
29877 |
Noch 36750 - Berger et moutons 1:160 |
Diorama.fr / NEORAMA sarl |
29900 |
Noch 15712 - Cochons 1:87 |
Diorama.fr / NEORAMA sarl |
29903 |
Noch 15721 - Vaches noires et blanches 1:87 |
Diorama.fr / NEORAMA sarl |
29876 |
Noch 36745 - Animaux des bois 1:160 |
Diorama.fr / NEORAMA sarl |
29905 |
Noch 15723 - Vaches blanches et brunes 1:87 |
Diorama.fr / NEORAMA sarl |