Query time 0.00360
JSON explain
{
"query_block": {
"select_id": 1,
"cost": 0.04738964,
"filesort": {
"sort_key": "tconnect_ab__mb_motivation_items.position",
"temporary_table": {
"nested_loop": [
{
"table": {
"table_name": "tconnect_ab__mb_motivation_items",
"access_type": "index",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "7",
"used_key_parts": ["motivation_item_id", "storefront_id"],
"loops": 1,
"rows": 4,
"cost": 0.0115068,
"filtered": 100,
"attached_condition": "tconnect_ab__mb_motivation_items.storefront_id = 3 and tconnect_ab__mb_motivation_items.`status` = 'A' and (tconnect_ab__mb_motivation_items.usergroup_ids = '' or find_in_set(0,tconnect_ab__mb_motivation_items.usergroup_ids) or find_in_set(1,tconnect_ab__mb_motivation_items.usergroup_ids))"
}
},
{
"table": {
"table_name": "destination_objects_not_exclude",
"access_type": "ref",
"possible_keys": ["PRIMARY", "mid_otype"],
"key": "mid_otype",
"key_length": "6",
"used_key_parts": ["motivation_item_id", "object_type"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00471282,
"filtered": 100,
"attached_condition": "trigcond(destination_objects_not_exclude.object_id in (0,7) or destination_objects_not_exclude.object_id is null) and trigcond(destination_objects_not_exclude.object_type = 'D' and trigcond(tconnect_ab__mb_motivation_items.exclude_destinations = 'N'))",
"using_index": true
}
},
{
"table": {
"table_name": "destination_objects_exclude",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "mid_otype"],
"key": "mid_otype",
"key_length": "9",
"used_key_parts": ["motivation_item_id", "object_type", "object_id"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00431682,
"filtered": 100,
"attached_condition": "trigcond(destination_objects_exclude.motivation_item_id is null) and trigcond(destination_objects_exclude.object_type = 'D' and trigcond(tconnect_ab__mb_motivation_items.exclude_destinations = 'Y'))",
"using_index": true,
"not_exists": true
}
},
{
"table": {
"table_name": "tconnect_ab__mb_motivation_item_descriptions",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["motivation_item_id", "lang_code"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00439696,
"filtered": 100,
"attached_condition": "tconnect_ab__mb_motivation_item_descriptions.lang_code = 'en'"
}
},
{
"table": {
"table_name": "category_objects_not_exclude",
"access_type": "ref",
"possible_keys": ["PRIMARY", "mid_otype"],
"key": "mid_otype",
"key_length": "6",
"used_key_parts": ["motivation_item_id", "object_type"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00471282,
"filtered": 100,
"attached_condition": "trigcond(category_objects_not_exclude.object_id in (0,170) or category_objects_not_exclude.object_id is null) and trigcond(category_objects_not_exclude.object_type = 'C' and trigcond(tconnect_ab__mb_motivation_items.exclude_categories = 'N'))",
"using_index": true
}
},
{
"table": {
"table_name": "category_objects_exclude",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "mid_otype"],
"key": "mid_otype",
"key_length": "9",
"used_key_parts": ["motivation_item_id", "object_type", "object_id"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00431682,
"filtered": 100,
"attached_condition": "trigcond(category_objects_exclude.motivation_item_id is null) and trigcond(category_objects_exclude.object_type = 'C' and trigcond(tconnect_ab__mb_motivation_items.exclude_categories = 'Y'))",
"using_index": true,
"not_exists": true
}
},
{
"table": {
"table_name": "product_objects_not_exclude",
"access_type": "ref",
"possible_keys": ["PRIMARY", "mid_otype"],
"key": "mid_otype",
"key_length": "6",
"used_key_parts": ["motivation_item_id", "object_type"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00471282,
"filtered": 100,
"attached_condition": "trigcond(product_objects_not_exclude.object_id in (0,228) or product_objects_not_exclude.object_id is null) and trigcond(product_objects_not_exclude.object_type = 'P' and trigcond(tconnect_ab__mb_motivation_items.exclude_products = 'N'))",
"using_index": true
}
},
{
"table": {
"table_name": "product_objects_exclude",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "mid_otype"],
"key": "mid_otype",
"key_length": "9",
"used_key_parts": ["motivation_item_id", "object_type", "object_id"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00431682,
"filtered": 100,
"attached_condition": "trigcond(product_objects_exclude.motivation_item_id is null) and trigcond(product_objects_exclude.object_type = 'P' and trigcond(tconnect_ab__mb_motivation_items.exclude_products = 'Y'))",
"using_index": true,
"not_exists": true
}
},
{
"table": {
"table_name": "vd",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "13",
"used_key_parts": ["motivation_item_id", "company_id", "lang_code"],
"ref": [
"tconnect.tconnect_ab__mb_motivation_items.motivation_item_id",
"const",
"const"
],
"loops": 4,
"rows": 1,
"cost": 0.00439696,
"filtered": 100,
"attached_condition": "trigcond(vd.lang_code = 'en')"
}
}
]
}
}
}
}