Query time 0.00135
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "4.67"
},
"ordering_operation": {
"using_filesort": false,
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"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": 6,
"rows_produced_per_join": 1,
"filtered": "19.67",
"index_condition": "(`cscartdb`.`products`.`product_id` in (60362,69515,69516,69517,69518,69519))",
"cost_info": {
"read_cost": "4.09",
"eval_cost": "0.12",
"prefix_cost": "4.21",
"data_read_per_join": "6K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"parent_product_id",
"variation_sku"
],
"attached_condition": "((`cscartdb`.`products`.`amount` > 0) and ((`cscartdb`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscartdb`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscartdb`.`products`.`usergroup_ids`))) and (`cscartdb`.`products`.`status` = 'A'))"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscartdb.products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "9.00",
"cost_info": {
"read_cost": "0.30",
"eval_cost": "0.01",
"prefix_cost": "4.62",
"data_read_per_join": "2"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`cscartdb`.`prices`.`lower_limit` = 1) and (`cscartdb`.`prices`.`usergroup_id` in (0,0,1)) and (`cscartdb`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"cscartdb.products.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "10.00",
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.00",
"prefix_cost": "4.66",
"data_read_per_join": "171"
},
"used_columns": [
"company_id",
"status",
"company",
"discreet_shipping"
],
"attached_condition": "(`cscartdb`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"cscartdb.products.product_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.01",
"eval_cost": "0.00",
"prefix_cost": "4.67",
"data_read_per_join": "0"
},
"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": [
"cscartdb.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.01",
"eval_cost": "0.00",
"prefix_cost": "4.68",
"data_read_per_join": "3"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`cscartdb`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`cscartdb`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`cscartdb`.`cscart_categories`.`usergroup_ids`))) and (`cscartdb`.`cscart_categories`.`status` in ('A','H')) and (`cscartdb`.`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": [
"cscartdb.products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.00",
"prefix_cost": "4.68",
"data_read_per_join": "4"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
product_type |
parent_product_id |
variation_sku |
company_discreet_shipping |
60362 |
Leather Gwendoline Bondage Hood |
Restricted Senses |
P |
0 |
85acbb06-d431-414d-9e5a-a97cdf219057 |
Y |
69515 |
Leather Gwendoline Bondage Hood |
Restricted Senses |
V |
60362 |
85acbb06-d431-414d-9e5a-a97cdf219057 |
Y |
69516 |
Leather Gwendoline Bondage Hood |
Restricted Senses |
V |
60362 |
85acbb06-d431-414d-9e5a-a97cdf219057 |
Y |
69517 |
Leather Gwendoline Bondage Hood |
Restricted Senses |
V |
60362 |
85acbb06-d431-414d-9e5a-a97cdf219057 |
Y |
69518 |
Leather Gwendoline Bondage Hood |
Restricted Senses |
V |
60362 |
85acbb06-d431-414d-9e5a-a97cdf219057 |
Y |
69519 |
Leather Gwendoline Bondage Hood |
Restricted Senses |
V |
60362 |
85acbb06-d431-414d-9e5a-a97cdf219057 |
Y |