Query time 0.00221
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "20.50"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 6,
"rows_produced_per_join": 1,
"filtered": "16.67",
"cost_info": {
"read_cost": "3.27",
"eval_cost": "0.20",
"prefix_cost": "3.47",
"data_read_per_join": "7K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "((`atulecarter_atul_demo1`.`companies`.`status` = 'A') and (`atulecarter_atul_demo1`.`companies`.`company_id` in ('1','2','3','4','5','6')))"
}
},
{
"table": {
"table_name": "cscart_product_sales",
"access_type": "ALL",
"possible_keys": [
"PRIMARY",
"pa"
],
"rows_examined_per_scan": 24,
"rows_produced_per_join": 7,
"filtered": "33.33",
"using_join_buffer": "Block Nested Loop",
"cost_info": {
"read_cost": "5.27",
"eval_cost": "1.60",
"prefix_cost": "10.34",
"data_read_per_join": "127"
},
"used_columns": [
"category_id",
"product_id",
"amount"
],
"attached_condition": "(`atulecarter_atul_demo1`.`cscart_product_sales`.`amount` >= 1)"
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"atulecarter_atul_demo1.cscart_product_sales.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "8.00",
"eval_cost": "0.08",
"prefix_cost": "19.94",
"data_read_per_join": "1K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"usergroup_ids",
"parent_product_id"
],
"attached_condition": "((`atulecarter_atul_demo1`.`products`.`company_id` = `atulecarter_atul_demo1`.`companies`.`company_id`) and (`atulecarter_atul_demo1`.`products`.`parent_product_id` = 0) and ((`atulecarter_atul_demo1`.`products`.`usergroup_ids` = '') or find_in_set(0,`atulecarter_atul_demo1`.`products`.`usergroup_ids`) or find_in_set(1,`atulecarter_atul_demo1`.`products`.`usergroup_ids`)) and (`atulecarter_atul_demo1`.`products`.`status` = 'A') and (`atulecarter_atul_demo1`.`products`.`product_type` <> 'D'))"
}
},
{
"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": [
"atulecarter_atul_demo1.cscart_product_sales.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.40",
"eval_cost": "0.00",
"prefix_cost": "20.42",
"data_read_per_join": "53"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`atulecarter_atul_demo1`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`atulecarter_atul_demo1`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`atulecarter_atul_demo1`.`cscart_categories`.`usergroup_ids`)) and (`atulecarter_atul_demo1`.`cscart_categories`.`status` in ('A','H')) and (`atulecarter_atul_demo1`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"atulecarter_atul_demo1.cscart_product_sales.category_id",
"atulecarter_atul_demo1.cscart_product_sales.product_id"
],
"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": "20.44",
"data_read_per_join": "0"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"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": [
"atulecarter_atul_demo1.cscart_product_sales.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.00",
"prefix_cost": "20.47",
"data_read_per_join": "93"
},
"used_columns": [
"product_id",
"lang_code",
"product",
"full_description"
]
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "usergroup",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"atulecarter_atul_demo1.cscart_product_sales.product_id"
],
"rows_examined_per_scan": 3,
"rows_produced_per_join": 0,
"filtered": "97.36",
"using_index": true,
"cost_info": {
"read_cost": "0.02",
"eval_cost": "0.01",
"prefix_cost": "20.50",
"data_read_per_join": "1"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`atulecarter_atul_demo1`.`prices`.`lower_limit` = 1) and (`atulecarter_atul_demo1`.`prices`.`usergroup_id` in (0,0,1)))"
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
product_type |
parent_product_id |
sales_amount |
full_description |
11 |
Collegiate 72 Tee |
CS-Cart |
P |
0 |
2 |
<p>It's not how old you are, it's how stylish, and this men's adidas Originals Collegiate 72 Tee shirt feels just as fresh as it was the day the Trefoil was born in 1972. That's why this t-shirt features a collegiate "72" on the front.</p> |
290 |
Deluxe Queen Room with Two Queen Beds |
prime hotel |
P |
0 |
3 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
292 |
Deluxe Queen Room with Two Queen Beds |
super hotel |
P |
0 |
3 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
300 |
Deluxe Queen Room with Two Queen Beds |
king hotel |
P |
0 |
37 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
303 |
Deluxe Queen Room with Two Queen Beds |
king hotel |
P |
0 |
14 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
304 |
Deluxe Queen Room with Two Queen Beds |
king hotel |
P |
0 |
5 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
308 |
Deluxe Queen Room with Two Queen Beds |
king hotel |
P |
0 |
1 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
309 |
Deluxe Queen Room with Two Queen Beds |
king hotel |
P |
0 |
1 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
310 |
Deluxe Queen Room with Two Queen Beds |
king hotel |
P |
0 |
1 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
298 |
Deluxe room with Two Queen Beds |
king hotel |
P |
0 |
1 |
<p>A hotel is a commercial establishment that provides lodging, meals, and other services to guests, travelers, and tourists. Hotels can range from small family-run businesses to large international chains. Most hotels list a variety of services, such as room service, laundry, and concierge.</p> |
334 |
demo test |
super hotel |
P |
0 |
1 |
|
301 |
Premium Room |
ACME Corp |
P |
0 |
1 |
|