Query time 0.00123
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "62.14"
},
"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": 25,
"rows_produced_per_join": 0,
"filtered": "3.19",
"index_condition": "(`ea201_diorama`.`products`.`product_id` in (31153,31152,31151,31149,31150,31155,31156,30407,31159,31158,31148,31147,31138,31139,31137,31136,31135,31140,31141,31145,31146,31144,31143,31142,31134))",
"cost_info": {
"read_cost": "59.85",
"eval_cost": "0.16",
"prefix_cost": "60.01",
"data_read_per_join": "2K"
},
"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": "0.80",
"eval_cost": "0.05",
"prefix_cost": "60.97",
"data_read_per_join": "5"
},
"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": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.48",
"eval_cost": "0.10",
"prefix_cost": "61.54",
"data_read_per_join": "7"
},
"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": "0.48",
"eval_cost": "0.00",
"prefix_cost": "62.11",
"data_read_per_join": "63"
},
"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.01",
"eval_cost": "0.00",
"prefix_cost": "62.13",
"data_read_per_join": "93"
},
"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.01",
"eval_cost": "0.00",
"prefix_cost": "62.14",
"data_read_per_join": "93"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
31135 |
Heki 30801 - 2 tapis prairie 40 X 25 cm x 1 mm |
Diorama.fr / NEORAMA sarl |
30407 |
Noch 61151 - Colle universelle en bombe 400 ml |
Diorama.fr / NEORAMA sarl |
31134 |
Heki 30800 - 2 tapis vert clair 40 X 25 cm |
Diorama.fr / NEORAMA sarl |
31136 |
Heki 30901 - Tapis gazon vert clair 75 X 100 |
Diorama.fr / NEORAMA sarl |
31139 |
Heki 30911 - Tapis gazon vert foncé 75 X 100 |
Diorama.fr / NEORAMA sarl |
31140 |
Heki 30912 - Tapis gazon vert foncé 100 X 200 |
Diorama.fr / NEORAMA sarl |
31141 |
Heki 30913 - Tapis gazon vert foncé 100 X 300 |
Diorama.fr / NEORAMA sarl |
31144 |
Heki 30923 - Tapis gazon prairie 100 X 300 |
Diorama.fr / NEORAMA sarl |
31145 |
Heki 30931 - Tapis gazon 4 couleurs 75 X 100 |
Diorama.fr / NEORAMA sarl |
31153 |
JORD-102 - Tapis d'herbe lumineux 100 x 200 cm |
Diorama.fr / NEORAMA sarl |
31155 |
JORD-104 - Tapis d'herbe foncé 75 x 100 cm |
Diorama.fr / NEORAMA sarl |