Query time 0.00143
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "10.80"
},
"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": "1.00",
"eval_cost": "0.20",
"prefix_cost": "1.20",
"data_read_per_join": "1K"
},
"used_columns": [
"motivation_item_id",
"storefront_id",
"position",
"expanded_desktop",
"expanded_tablet",
"expanded_mobile",
"vendor_edit",
"status",
"icon_type",
"icon_class",
"icon_color",
"exclude_categories",
"exclude_destinations",
"exclude_products",
"template_path",
"template_settings",
"usergroup_ids"
],
"attached_condition": "((`cscart`.`cscart_ab__mb_motivation_items`.`storefront_id` = 1) and (`cscart`.`cscart_ab__mb_motivation_items`.`status` = 'A') and ((`cscart`.`cscart_ab__mb_motivation_items`.`usergroup_ids` = '') or find_in_set(0,`cscart`.`cscart_ab__mb_motivation_items`.`usergroup_ids`) or find_in_set(1,`cscart`.`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": [
"cscart.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": "1.00",
"eval_cost": "0.20",
"prefix_cost": "2.40",
"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": "PRIMARY",
"used_key_parts": [
"motivation_item_id"
],
"key_length": "3",
"ref": [
"cscart.cscart_ab__mb_motivation_items.motivation_item_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "3.60",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(destination_objects_not_exclude), ((`cscart`.`destination_objects_not_exclude`.`object_id` in (0,1)) or isnull(`cscart`.`destination_objects_not_exclude`.`object_id`)), true) and <if>(is_not_null_compl(destination_objects_not_exclude), ((`cscart`.`destination_objects_not_exclude`.`object_type` = 'D') and (`cscart`.`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": [
"cscart.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.20",
"prefix_cost": "4.80",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(destination_objects_exclude), isnull(`cscart`.`destination_objects_exclude`.`motivation_item_id`), true) and <if>(is_not_null_compl(destination_objects_exclude), (`cscart`.`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": "PRIMARY",
"used_key_parts": [
"motivation_item_id"
],
"key_length": "3",
"ref": [
"cscart.cscart_ab__mb_motivation_items.motivation_item_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "6.00",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(category_objects_not_exclude), ((`cscart`.`category_objects_not_exclude`.`object_id` in (0,350)) or isnull(`cscart`.`category_objects_not_exclude`.`object_id`)), true) and <if>(is_not_null_compl(category_objects_not_exclude), ((`cscart`.`category_objects_not_exclude`.`object_type` = 'C') and (`cscart`.`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": [
"cscart.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.20",
"prefix_cost": "7.20",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(category_objects_exclude), isnull(`cscart`.`category_objects_exclude`.`motivation_item_id`), true) and <if>(is_not_null_compl(category_objects_exclude), (`cscart`.`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": "PRIMARY",
"used_key_parts": [
"motivation_item_id"
],
"key_length": "3",
"ref": [
"cscart.cscart_ab__mb_motivation_items.motivation_item_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.00",
"eval_cost": "0.20",
"prefix_cost": "8.40",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(product_objects_not_exclude), ((`cscart`.`product_objects_not_exclude`.`object_id` in (0,972)) or isnull(`cscart`.`product_objects_not_exclude`.`object_id`)), true) and <if>(is_not_null_compl(product_objects_not_exclude), ((`cscart`.`product_objects_not_exclude`.`object_type` = 'P') and (`cscart`.`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": [
"cscart.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.20",
"prefix_cost": "9.60",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(product_objects_exclude), isnull(`cscart`.`product_objects_exclude`.`motivation_item_id`), true) and <if>(is_not_null_compl(product_objects_exclude), (`cscart`.`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": [
"cscart.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": "1.00",
"eval_cost": "0.20",
"prefix_cost": "10.80",
"data_read_per_join": "32"
},
"used_columns": [
"motivation_item_id",
"company_id",
"lang_code",
"description",
"status"
]
}
}
]
}
}
}
}