# One the Spider node MariaDB [gbd]> explain format=JSON SELECT cause_id, location_id, year_id, sex_id, age_group_id, val AS current FROM output_epi_single_year_v19063_prevalence WHERE metric_id = 1 AND measure_id = 5 AND year_id = 2022 AND sex_id IN (2) AND location_id IN (1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,413,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53, 54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107, 108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150, 151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,53432,184,186,185,187,189,190,191,192, 193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,416,53533,53534,53535,53536,53537,53538,53539,53540,53541,53542, 53543,53544,53545,298,53547,53548,53546,53550,53551,53552,305,53554,53553,53556,53557,53558,53559,53560,53561,53555,53563,53564,53565,53566,53562,320,53568,53570,53571, 53572,53573,53569,53575,53576,53574,53578,53579,53577,53580,53582,53583,53584,53585,53586,53581,53588,53589,53590,53591,53592,53593,53594,53595,53596,349,53597,351,53599, 53598,354,53602,53604,53605,53603,53600,53608,361,53610,53611,53612,53613,53614,367,53615,53616,53617,53618,53619,53620,53621,369,374,376,380,385,393,25338,396,25318,25334, 25319,53660,53661,53662,53663,53664,53665,53666,53667,53668,53669,53670,53671,53672,53673,53674,53675,422,25321,25322,25323,25335,433,434,435,25324,25325,25326,25327,25328, 25336,25329,25330,25331,25332,25333,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515, 516,517,518,519,520,521,4618,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557, 558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,4661,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,4673,4674,522,25341,25342,35424,35425,35426, 35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35449,35450,35451,35452,35453,35454, 35455,35456,35457,35458,35459,35460,35461,35462,35463,35464,35465,35466,35467,35468,35469,35470,4749,4750,4751,4753,4752,4754,4755,4756,4757,4758,4759,4762,4761,4760,4763, 4764,4765,4766,4767,4768,4769,4772,4770,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,4619, 25346,4620,4621,4622,4623,4624,25340,60132,60133,60134,60135,60136,60137,4625,4626,4841,4842,4843,4844,4846,4849,4850,4851,4852,4853,4854,4855,4856,4857,30,4859,4860,4861, 4862,4863,4864,4865,25337,4867,4868,4869,4870,4871,4872,4873,4874,4875,25347,25348,25349,25350,25351,25352,25353,25354,4636,35617,35618,35619,35620,35621,35622,35623, 35624,35625,35626,35627,35628,35629,4910,35630,35631,35632,35633,35634,35635,35636,35637,35638,4920,35639,35640,4923,35641,35642,4926,35643,35644,4643,35645,35646,35647, 35648,4644,35649,35650,35651,35652,4645,4940,35653,35654,35655,4944,4646,35657,35658,35659,4647,35661,35662,35663,4648,4649,43872,43873,43874,43875,4650,43877,43880,4651, 43881,43882,43883,43884,4652,43885,43886,43887,43888,4653,43890,43891,43892,43893,4654,43894,43895,43896,43898,4655,43899,43900,43901,43902,4656,43903,43908,43909,43910, 4657,43911,43913,43905,43906,4658,43916,43917,43918,43919,4659,43920,43921,43922,43923,4660,43924,43926,43927,43928,43929,43930,43931,43932,43934,43935,43936,43937,43938, 43939,43940,43941,43942,25339,25343,53549,43904,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,35656,4720,53567,4721,4722,4723,35660,4724,4725,4726,4727,4728,25344, 4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,53587,4741,4742,25345,53601,50559,53606,53607,25320,53609,4771,4773,4774,4775,4776,44538,44539,44540,44643, 44644,44645,44646,44647,44648,44649,44650,44651,44652,44653,44654,44655,44656,44657,44658,44659,44660,44661,44662,44663,44664,44665,44666,44667,44668,44669,44670,44671, 44672,44673,44674,44675,44676,44677,44678,44679,44680,44681,44682,44683,44684,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699, 44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727, 44728,44729,44730,44731,44732,44733,44734,44735,44736,44737,44738,44739,44740,44741,44742,44743,44744,44745,44746,44747,44748,44749,44750,44751,44752,44753,44754,44755, 44756,44757,44758,44759,44760,44761,44762,44763,44764,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44776,44777,44778,44779,44780,44781,44782,44783, 44784,44785,44786,44787,44788,44789,44790,44791,44792,44850,44851,44852,44853,44854,44855,44856,44857,44858,44859,44860,44861,44862,44864,44865,44866,44867,44868,44869, 44870,44871,44872,44873,44874,44875,44876,44877,44878,44879,44880,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44892,44893,44894,44903,44904,44905, 44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44921,44922,44923,44924,44925,44926,44927,44928,44929,44930,44931,44932,44933, 44934,44935,44936,44937,44938,44939,44940,44941,44942,44943,44944,44945,44946,44947,44948,44949,44950,44951,44952,44953,44954,44955,44956,44957,44958,44959,44960,44961, 44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44984,44985,44986,44987) AND age_group_id IN (3) AND cause_id IN (294); ERROR 2006 (HY000): Server has gone away No connection. Trying to reconnect... Connection id: 381985 Current database: gbd +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | EXPLAIN | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | { "query_block": { "select_id": 1, "table": { "table_name": "output_epi_single_year_v19063_prevalence", "access_type": "ref", "possible_keys": ["PRIMARY"], "key": "PRIMARY", "key_length": "3", "used_key_parts": ["measure_id", "year_id"], "ref": ["const", "const"], "rows": 816, "filtered": 100, "pushed_condition": true }, "table": { "table_name": "", "access_type": "eq_ref", "possible_keys": ["distinct_key"], "key": "distinct_key", "key_length": "4", "used_key_parts": ["_col_1"], "ref": ["func"], "rows": 1, "filtered": 100, "attached_condition": "output_epi_single_year_v19063_prevalence.location_id = tvc_0._col_1", "materialized": { "unique": 1, "query_block": { "select_id": 2, "table": { "table_name": "", "access_type": "ALL", "rows": 1075, "filtered": 100, "materialized": { "query_block": { "union_result": { "query_specifications": [ { "query_block": { "select_id": 3, "table": { "message": "No tables used" } } } ] } } } } } } } } } | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.811 sec) # On the backend node MariaDB [gbd]> explain format=JSON SELECT cause_id, location_id, year_id, sex_id, age_group_id, val AS current FROM output_epi_single_year_v19063_prevalence WHERE metric_id = 1 AND measure_id = 5 AND year_id = 2022 AND sex_id IN (2) AND location_id IN (1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,413,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,53432,184,186,185,187,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,416,53533,53534,53535,53536,53537,53538,53539,53540,53541,53542,53543,53544,53545,298,53547,53548,53546,53550,53551,53552,305,53554,53553,53556,53557,53558,53559,53560,53561,53555,53563,53564,53565,53566,53562,320,53568,53570,53571,53572,53573,53569,53575,53576,53574,53578,53579,53577,53580,53582,53583,53584,53585,53586,53581,53588,53589,53590,53591,53592,53593,53594,53595,53596,349,53597,351,53599,53598,354,53602,53604,53605,53603,53600,53608,361,53610,53611,53612,53613,53614,367,53615,53616,53617,53618,53619,53620,53621,369,374,376,380,385,393,25338,396,25318,25334,25319,53660,53661,53662,53663,53664,53665,53666,53667,53668,53669,53670,53671,53672,53673,53674,53675,422,25321,25322,25323,25335,433,434,435,25324,25325,25326,25327,25328,25336,25329,25330,25331,25332,25333,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,4618,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,4661,4662,4663,4664,4665,4666,4667,4668,4669,4670,4671,4672,4673,4674,522,25341,25342,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35449,35450,35451,35452,35453,35454,35455,35456,35457,35458,35459,35460,35461,35462,35463,35464,35465,35466,35467,35468,35469,35470,4749,4750,4751,4753,4752,4754,4755,4756,4757,4758,4759,4762,4761,4760,4763,4764,4765,4766,4767,4768,4769,4772,4770,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,4619,25346,4620,4621,4622,4623,4624,25340,60132,60133,60134,60135,60136,60137,4625,4626,4841,4842,4843,4844,4846,4849,4850,4851,4852,4853,4854,4855,4856,4857,30,4859,4860,4861,4862,4863,4864,4865,25337,4867,4868,4869,4870,4871,4872,4873,4874,4875,25347,25348,25349,25350,25351,25352,25353,25354,4636,35617,35618,35619,35620,35621,35622,35623,35624,35625,35626,35627,35628,35629,4910,35630,35631,35632,35633,35634,35635,35636,35637,35638,4920,35639,35640,4923,35641,35642,4926,35643,35644,4643,35645,35646,35647,35648,4644,35649,35650,35651,35652,4645,4940,35653,35654,35655,4944,4646,35657,35658,35659,4647,35661,35662,35663,4648,4649,43872,43873,43874,43875,4650,43877,43880,4651,43881,43882,43883,43884,4652,43885,43886,43887,43888,4653,43890,43891,43892,43893,4654,43894,43895,43896,43898,4655,43899,43900,43901,43902,4656,43903,43908,43909,43910,4657,43911,43913,43905,43906,4658,43916,43917,43918,43919,4659,43920,43921,43922,43923,4660,43924,43926,43927,43928,43929,43930,43931,43932,43934,43935,43936,43937,43938,43939,43940,43941,43942,25339,25343,53549,43904,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,35656,4720,53567,4721,4722,4723,35660,4724,4725,4726,4727,4728,25344,4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,53587,4741,4742,25345,53601,50559,53606,53607,25320,53609,4771,4773,4774,4775,4776,44538,44539,44540,44643,44644,44645,44646,44647,44648,44649,44650,44651,44652,44653,44654,44655,44656,44657,44658,44659,44660,44661,44662,44663,44664,44665,44666,44667,44668,44669,44670,44671,44672,44673,44674,44675,44676,44677,44678,44679,44680,44681,44682,44683,44684,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699,44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727,44728,44729,44730,44731,44732,44733,44734,44735,44736,44737,44738,44739,44740,44741,44742,44743,44744,44745,44746,44747,44748,44749,44750,44751,44752,44753,44754,44755,44756,44757,44758,44759,44760,44761,44762,44763,44764,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44776,44777,44778,44779,44780,44781,44782,44783,44784,44785,44786,44787,44788,44789,44790,44791,44792,44850,44851,44852,44853,44854,44855,44856,44857,44858,44859,44860,44861,44862,44864,44865,44866,44867,44868,44869,44870,44871,44872,44873,44874,44875,44876,44877,44878,44879,44880,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44892,44893,44894,44903,44904,44905,44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44921,44922,44923,44924,44925,44926,44927,44928,44929,44930,44931,44932,44933,44934,44935,44936,44937,44938,44939,44940,44941,44942,44943,44944,44945,44946,44947,44948,44949,44950,44951,44952,44953,44954,44955,44956,44957,44958,44959,44960,44961,44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44984,44985,44986,44987) AND age_group_id IN (3) AND cause_id IN (294); +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | EXPLAIN | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | { "query_block": { "select_id": 1, "table": { "table_name": "", "access_type": "ALL", "possible_keys": ["distinct_key"], "rows": 1075, "filtered": 100, "materialized": { "unique": 1, "query_block": { "select_id": 2, "table": { "table_name": "", "access_type": "ALL", "rows": 1075, "filtered": 100, "materialized": { "query_block": { "union_result": { "query_specifications": [ { "query_block": { "select_id": 3, "table": { "message": "No tables used" } } } ] } } } } } } }, "table": { "table_name": "output_epi_single_year_v19063_prevalence", "access_type": "eq_ref", "possible_keys": ["PRIMARY"], "key": "PRIMARY", "key_length": "12", "used_key_parts": [ "measure_id", "year_id", "location_id", "sex_id", "age_group_id", "cause_id", "metric_id" ], "ref": ["const", "const", "tvc_0._col_1", "const", "const", "const", "const"], "rows": 1, "filtered": 100, "attached_condition": "output_epi_single_year_v19063_prevalence.location_id = tvc_0._col_1" } } } | +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.001 sec)