Query time 0.03481
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "10.98"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "shared_prices",
"access_type": "system",
"possible_keys": [
"usergroup",
"product_id",
"company_id",
"lower_limit",
"usergroup_id"
],
"rows_examined_per_scan": 0,
"rows_produced_per_join": 1,
"filtered": "0.00",
"const_row_not_found": true,
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "32"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"company_id",
"usergroup_id"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 9,
"rows_produced_per_join": 0,
"filtered": "4.00",
"index_condition": "(`primapearl_r_new`.`cscart_categories`.`category_id` in (523,530,529,528,531,527,525,526,524))",
"cost_info": {
"read_cost": "6.27",
"eval_cost": "0.04",
"prefix_cost": "6.31",
"data_read_per_join": "1K"
},
"used_columns": [
"category_id",
"usergroup_ids",
"status",
"storefront_id"
],
"attached_condition": "(((`primapearl_r_new`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`primapearl_r_new`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`primapearl_r_new`.`cscart_categories`.`usergroup_ids`))) and (`primapearl_r_new`.`cscart_categories`.`status` in ('A','H')) and (`primapearl_r_new`.`cscart_categories`.`storefront_id` in (0,2)))"
}
},
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 0,
"filtered": "50.00",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "0.62",
"eval_cost": "0.04",
"prefix_cost": "6.96",
"data_read_per_join": "2K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`primapearl_r_new`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"primapearl_r_new.cscart_categories.category_id"
],
"rows_examined_per_scan": 45,
"rows_produced_per_join": 16,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.19",
"eval_cost": "1.62",
"prefix_cost": "8.77",
"data_read_per_join": "259"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"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": [
"primapearl_r_new.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "6.62",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.11",
"prefix_cost": "10.39",
"data_read_per_join": "9K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"usergroup_ids",
"parent_product_id"
],
"attached_condition": "((`primapearl_r_new`.`products`.`company_id` = `primapearl_r_new`.`companies`.`company_id`) and (`primapearl_r_new`.`products`.`parent_product_id` = 0) and ((`primapearl_r_new`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`primapearl_r_new`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`primapearl_r_new`.`products`.`usergroup_ids`))) and (`primapearl_r_new`.`products`.`status` = 'A'))"
}
},
{
"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": [
"primapearl_r_new.products_categories.product_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.11",
"prefix_cost": "10.50",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"lang_code",
"company_id",
"product"
]
}
},
{
"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": [
"primapearl_r_new.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.11",
"prefix_cost": "10.61",
"data_read_per_join": "4K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
},
{
"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": [
"primapearl_r_new.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "44.01",
"cost_info": {
"read_cost": "0.27",
"eval_cost": "0.05",
"prefix_cost": "10.98",
"data_read_per_join": "11"
},
"used_columns": [
"product_id",
"price",
"percentage_discount",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`primapearl_r_new`.`prices`.`lower_limit` = 1) and (`primapearl_r_new`.`prices`.`usergroup_id` in (0,0,1)))"
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
price |
product_type |
parent_product_id |
| 4610 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4611 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4612 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4613 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4614 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4616 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4619 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4620 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4622 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4624 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4625 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4626 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4627 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4628 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4629 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4631 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4632 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4633 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4663 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4664 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4669 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4671 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4673 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4674 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4675 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4677 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |
| 4679 |
Gold ring |
Prima English |
0.00000000 |
P |
0 |