{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "52748.51"
},
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": true,
"cost_info": {
"sort_cost": "19.24"
},
"nested_loop": [
{
"table": {
"table_name": "dim",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"campaign_state",
"user_id",
"campaign_id_index",
"filter_index"
],
"key": "user_id",
"used_key_parts": [
"userId"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 3601,
"rows_produced_per_join": 360,
"filtered": "10.00",
"cost_info": {
"read_cost": "3601.00",
"eval_cost": "72.02",
"prefix_cost": "4321.20",
"data_read_per_join": "2M"
},
"used_columns": [
"campaignId",
"userId",
"amsProfileId",
"startDate",
"state"
],
"attached_condition": "(`demandhelm`.`dim`.`state` = 'enabled')"
}
},
{
"table": {
"table_name": "fact",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"key_index",
"report_type_index",
"date_index",
"user_id",
"campaign_id",
"targeting_text",
"query_index"
],
"key": "campaign_id",
"used_key_parts": [
"campaign_id",
"user_id"
],
"key_length": "16",
"ref": [
"demandhelm.dim.campaignId",
"const"
],
"rows_examined_per_scan": 111,
"rows_produced_per_join": 18,
"filtered": "0.04",
"index_condition": "(`demandhelm`.`fact`.`date` between '2022-09-18' and '2022-10-22')",
"cost_info": {
"read_cost": "40297.02",
"eval_cost": "3.60",
"prefix_cost": "52677.62",
"data_read_per_join": "220K"
},
"used_columns": [
"ams_profile_id",
"user_id",
"campaign_name",
"campaign_id",
"target_id",
"targeting_text",
"targeting_type",
"impressions",
"clicks",
"cost",
"attributed_conversions14d",
"attributed_conversions14d_same_sku",
"attributed_units_ordered14d",
"attributed_sales1d",
"attributed_sales7d",
"attributed_sales14d",
"attributed_sales30d",
"attributed_sales14d_same_sku",
"ad_type",
"country",
"brand",
"query",
"ad_group_name",
"ad_group_id",
"date",
"report_type",
"attributed_sales_new_to_brand14d"
],
"attached_condition": "((`demandhelm`.`fact`.`report_type` = 'keywords') and (`demandhelm`.`fact`.`country` = 'US') and (`demandhelm`.`fact`.`brand` = 'Duck Covers'))"
}
},
{
"table": {
"table_name": "keyword",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"state_index",
"user_id"
],
"key": "PRIMARY",
"used_key_parts": [
"userId",
"keywordId"
],
"key_length": "12",
"ref": [
"const",
"demandhelm.fact.target_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 18,
"filtered": "100.00",
"cost_info": {
"read_cost": "18.01",
"eval_cost": "3.60",
"prefix_cost": "52699.23",
"data_read_per_join": "43K"
},
"used_columns": [
"userId",
"keywordId",
"adGroupId",
"amsProfileId",
"campaignId",
"bid"
]
}
},
{
"table": {
"table_name": "adGroup",
"access_type": "ref",
"possible_keys": [
"ad_group_index"
],
"key": "ad_group_index",
"used_key_parts": [
"adGroupId"
],
"key_length": "8",
"ref": [
"demandhelm.keyword.adGroupId"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "10.00",
"index_condition": "(`demandhelm`.`adGroup`.`userId` = `demandhelm`.`keyword`.`userId`)",
"cost_info": {
"read_cost": "19.33",
"eval_cost": "0.39",
"prefix_cost": "52722.42",
"data_read_per_join": "3K"
},
"used_columns": [
"campaignId",
"adGroupId",
"amsProfileId",
"userId",
"defaultBid"
]
}
},
{
"table": {
"table_name": "term",
"access_type": "ref",
"possible_keys": [
"keyword_id_index"
],
"key": "keyword_id_index",
"used_key_parts": [
"keyword_id"
],
"key_length": "8",
"ref": [
"demandhelm.fact.target_id"
],
"rows_examined_per_scan": 9,
"rows_produced_per_join": 19,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "3.01",
"eval_cost": "3.85",
"prefix_cost": "52729.28",
"data_read_per_join": "38K"
},
"used_columns": [
"user_id",
"ams_profile_id",
"keyword_id",
"campaign_id",
"search_term"
],
"attached_condition": "(`demandhelm`.`fact`.`query` = convert(`demandhelm`.`term`.`search_term` using utf8mb4))"
}
}
]
}
}
}