Query time 0.00146
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.53"
},
"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": 2,
"rows_produced_per_join": 1,
"filtered": "50.00",
"cost_info": {
"read_cost": "2.28",
"eval_cost": "0.20",
"prefix_cost": "2.48",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`satishecarter_oct_test_02`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 7,
"rows_produced_per_join": 7,
"filtered": "100.00",
"index_condition": "(`satishecarter_oct_test_02`.`products_categories`.`product_id` in (241,244,245,246,247,248))",
"using_join_buffer": "Block Nested Loop",
"cost_info": {
"read_cost": "14.41",
"eval_cost": "1.40",
"prefix_cost": "18.29",
"data_read_per_join": "112"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"satishecarter_oct_test_02.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "8.82",
"cost_info": {
"read_cost": "7.00",
"eval_cost": "0.12",
"prefix_cost": "26.69",
"data_read_per_join": "2K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"usergroup_ids",
"parent_product_id"
],
"attached_condition": "((`satishecarter_oct_test_02`.`products`.`company_id` = `satishecarter_oct_test_02`.`companies`.`company_id`) and ((`satishecarter_oct_test_02`.`products`.`usergroup_ids` = '') or find_in_set(0,`satishecarter_oct_test_02`.`products`.`usergroup_ids`) or find_in_set(1,`satishecarter_oct_test_02`.`products`.`usergroup_ids`)) and (`satishecarter_oct_test_02`.`products`.`status` = 'A') and (`satishecarter_oct_test_02`.`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": [
"satishecarter_oct_test_02.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.62",
"eval_cost": "0.01",
"prefix_cost": "27.43",
"data_read_per_join": "82"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`satishecarter_oct_test_02`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`satishecarter_oct_test_02`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`satishecarter_oct_test_02`.`cscart_categories`.`usergroup_ids`)) and (`satishecarter_oct_test_02`.`cscart_categories`.`status` in ('A','H')) and (`satishecarter_oct_test_02`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"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": [
"satishecarter_oct_test_02.products_categories.product_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 0,
"filtered": "27.76",
"using_index": true,
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.00",
"prefix_cost": "27.47",
"data_read_per_join": "0"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`satishecarter_oct_test_02`.`prices`.`lower_limit` = 1) and (`satishecarter_oct_test_02`.`prices`.`usergroup_id` in (0,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": [
"satishecarter_oct_test_02.products_categories.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": "27.49",
"data_read_per_join": "80"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"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": [
"satishecarter_oct_test_02.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.03",
"eval_cost": "0.01",
"prefix_cost": "27.53",
"data_read_per_join": "0"
},
"used_columns": [
"supplier_id",
"object_id",
"object_type"
],
"attached_condition": "<if>(is_not_null_compl(cscart_supplier_links), (`satishecarter_oct_test_02`.`cscart_supplier_links`.`object_id` = `satishecarter_oct_test_02`.`products_categories`.`product_id`), true)"
}
}
]
}
}
}
}
Result
product_id |
product |
company_name |
supplier_id |
product_type |
parent_product_id |
245 |
Apple - iPhone 5c 32GB Cell Phone - Green |
CS-Cart |
|
P |
0 |
241 |
Apple® - iPad® with Retina® display Wi-Fi - 32GB - White |
CS-Cart |
|
P |
0 |
246 |
GoPro - Hero3+ Black Edition Camera |
CS-Cart |
|
P |
0 |
247 |
Nokia N1 Pad 7.9" Quad-Core 64bit 2.3GHz 2GB 32GB Android 5.0 |
CS-Cart |
|
P |
0 |
244 |
Packard Bell OneTwo |
CS-Cart |
|
P |
0 |
248 |
X-Box One |
CS-Cart |
|
P |
0 |