Query time 0.00092
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "5.40"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"grouping_operation": {
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_ab__mb_motivation_items",
"access_type": "index",
"possible_keys": [
"PRIMARY",
"exc_categories",
"exc_destinations",
"exc_products"
],
"key": "PRIMARY",
"used_key_parts": [
"motivation_item_id",
"storefront_id"
],
"key_length": "7",
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.35",
"data_read_per_join": "1K"
},
"used_columns": [
"motivation_item_id",
"storefront_id",
"position",
"expanded",
"vendor_edit",
"status",
"icon_type",
"icon_class",
"icon_color",
"exclude_categories",
"exclude_destinations",
"exclude_products",
"template_path",
"template_settings",
"usergroup_ids"
],
"attached_condition": "((`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`storefront_id` = 1) and (`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`status` = 'A') and ((`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`usergroup_ids` = '') or (0 <> find_in_set(0,`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`usergroup_ids`)) or (0 <> find_in_set(1,`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`usergroup_ids`))))"
}
},
{
"table": {
"table_name": "cscart_ab__mb_motivation_item_descriptions",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"motivation_item_id",
"lang_code"
],
"key_length": "9",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.70",
"data_read_per_join": "792"
},
"used_columns": [
"motivation_item_id",
"lang_code",
"name",
"description"
]
}
},
{
"table": {
"table_name": "destination_objects_not_exclude",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"mid_otype"
],
"key": "mid_otype",
"used_key_parts": [
"motivation_item_id",
"object_type"
],
"key_length": "6",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "1.05",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(destination_objects_not_exclude), ((`dev_yourmart_co_bw`.`destination_objects_not_exclude`.`object_id` in (0,12)) or (`dev_yourmart_co_bw`.`destination_objects_not_exclude`.`object_id` is null)), true) and <if>(is_not_null_compl(destination_objects_not_exclude), (`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`exclude_destinations` = 'N'), true))"
}
},
{
"table": {
"table_name": "destination_objects_exclude",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"mid_otype"
],
"key": "PRIMARY",
"used_key_parts": [
"motivation_item_id",
"object_id",
"object_type"
],
"key_length": "9",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"not_exists": true,
"using_index": true,
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.10",
"prefix_cost": "2.15",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(destination_objects_exclude), (`dev_yourmart_co_bw`.`destination_objects_exclude`.`motivation_item_id` is null), true) and <if>(is_not_null_compl(destination_objects_exclude), (`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`exclude_destinations` = 'Y'), true))"
}
},
{
"table": {
"table_name": "category_objects_not_exclude",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"mid_otype"
],
"key": "mid_otype",
"used_key_parts": [
"motivation_item_id",
"object_type"
],
"key_length": "6",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "2.50",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(category_objects_not_exclude), ((`dev_yourmart_co_bw`.`category_objects_not_exclude`.`object_id` in (0,569)) or (`dev_yourmart_co_bw`.`category_objects_not_exclude`.`object_id` is null)), true) and <if>(is_not_null_compl(category_objects_not_exclude), (`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`exclude_categories` = 'N'), true))"
}
},
{
"table": {
"table_name": "category_objects_exclude",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"mid_otype"
],
"key": "PRIMARY",
"used_key_parts": [
"motivation_item_id",
"object_id",
"object_type"
],
"key_length": "9",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"not_exists": true,
"using_index": true,
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.10",
"prefix_cost": "3.60",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(category_objects_exclude), (`dev_yourmart_co_bw`.`category_objects_exclude`.`motivation_item_id` is null), true) and <if>(is_not_null_compl(category_objects_exclude), (`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`exclude_categories` = 'Y'), true))"
}
},
{
"table": {
"table_name": "product_objects_not_exclude",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"mid_otype"
],
"key": "mid_otype",
"used_key_parts": [
"motivation_item_id",
"object_type"
],
"key_length": "6",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "3.95",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(product_objects_not_exclude), ((`dev_yourmart_co_bw`.`product_objects_not_exclude`.`object_id` in (0,16811)) or (`dev_yourmart_co_bw`.`product_objects_not_exclude`.`object_id` is null)), true) and <if>(is_not_null_compl(product_objects_not_exclude), (`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`exclude_products` = 'N'), true))"
}
},
{
"table": {
"table_name": "product_objects_exclude",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"mid_otype"
],
"key": "PRIMARY",
"used_key_parts": [
"motivation_item_id",
"object_id",
"object_type"
],
"key_length": "9",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"not_exists": true,
"using_index": true,
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.10",
"prefix_cost": "5.05",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(product_objects_exclude), (`dev_yourmart_co_bw`.`product_objects_exclude`.`motivation_item_id` is null), true) and <if>(is_not_null_compl(product_objects_exclude), (`dev_yourmart_co_bw`.`cscart_ab__mb_motivation_items`.`exclude_products` = 'Y'), true))"
}
},
{
"table": {
"table_name": "vd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"motivation_item_id",
"company_id",
"lang_code"
],
"key_length": "13",
"ref": [
"dev_yourmart_co_bw.cscart_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "5.40",
"data_read_per_join": "32"
},
"used_columns": [
"motivation_item_id",
"company_id",
"lang_code",
"description",
"status"
]
}
}
]
}
}
}
}