Query time 0.00154
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "6.95"
},
"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_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_desktop",
"expanded_tablet",
"expanded_mobile",
"vendor_edit",
"status",
"icon_type",
"icon_class",
"icon_color",
"exclude_destinations",
"exclude_products",
"exclude_categories",
"template_path",
"template_settings",
"usergroup_ids"
],
"attached_condition": "((`s2cart`.`cscart_ab__mb_motivation_items`.`storefront_id` = 3) and (`s2cart`.`cscart_ab__mb_motivation_items`.`status` = 'A') and ((`s2cart`.`cscart_ab__mb_motivation_items`.`usergroup_ids` = '') or (0 <> find_in_set(0,`s2cart`.`cscart_ab__mb_motivation_items`.`usergroup_ids`)) or (0 <> find_in_set(1,`s2cart`.`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": [
"s2cart.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.10",
"prefix_cost": "1.45",
"data_read_per_join": "792"
},
"used_columns": [
"motivation_item_id",
"lang_code",
"name",
"description"
]
}
},
{
"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": [
"s2cart.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.10",
"prefix_cost": "2.55",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(category_objects_not_exclude), ((`s2cart`.`category_objects_not_exclude`.`object_id` in (0,4936)) or (`s2cart`.`category_objects_not_exclude`.`object_id` is null)), true) and <if>(is_not_null_compl(category_objects_not_exclude), ((`s2cart`.`category_objects_not_exclude`.`object_type` = 'C') and (`s2cart`.`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": [
"s2cart.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.65",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(category_objects_exclude), (`s2cart`.`category_objects_exclude`.`motivation_item_id` is null), true) and <if>(is_not_null_compl(category_objects_exclude), (`s2cart`.`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": [
"s2cart.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.10",
"prefix_cost": "4.75",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(product_objects_not_exclude), ((`s2cart`.`product_objects_not_exclude`.`object_id` in (0,276641)) or (`s2cart`.`product_objects_not_exclude`.`object_id` is null)), true) and <if>(is_not_null_compl(product_objects_not_exclude), ((`s2cart`.`product_objects_not_exclude`.`object_type` = 'P') and (`s2cart`.`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": [
"s2cart.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.85",
"data_read_per_join": "16"
},
"used_columns": [
"motivation_item_id",
"object_id",
"object_type"
],
"attached_condition": "(<if>(found_match(product_objects_exclude), (`s2cart`.`product_objects_exclude`.`motivation_item_id` is null), true) and <if>(is_not_null_compl(product_objects_exclude), (`s2cart`.`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": [
"s2cart.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.10",
"prefix_cost": "6.95",
"data_read_per_join": "32"
},
"used_columns": [
"motivation_item_id",
"company_id",
"lang_code",
"description",
"status"
]
}
}
]
}
}
}
}