explain.depesz.com

PostgreSQL's explain analyze made readable

Result: C542 : from rails

Settings
# exclusive inclusive rows x rows loops node
1. 255.180 50,120.195 ↑ 3.4 3,066 1

HashAggregate (cost=13,171.88..13,274.81 rows=10,293 width=21) (actual time=50,119.249..50,120.195 rows=3,066 loops=1)

  • Group Key: subscriber_id, event
2. 49,865.015 49,865.015 ↓ 5.9 60,541 1

Index Scan using index_mailgun_events_on_store_id_and_subscriber_id on mailgun_events (cost=0.57..13,094.66 rows=10,296 width=13) (actual time=2.645..49,865.015 rows=60,541 loops=1)

  • Index Cond: ((store_id = 4,318) AND (subscriber_id = ANY ('{86133155,86133153,86132878,86132875,86132872,86132569,86132563,86132561,86132558,86132557,86132550,86132229,86132224,86132222,86132217,86132213,86132209,86131582,86131591,80240651,86109472,86109136,86109131,86109129,86109093,86108949,86108942,86108935,54925370,54925224,54925027,86100311,54924411,63050100,85451161,63046774,85516282,54898206,86089685,54871510,54871172,54870601,54866557,86089681,54861770,54860959,69224277,54860751,85912982,54859150,69411690,64018408,54858552,84076903,86089676,58039827,85402473,73729377,86089674,86027100,86089673,85771907,60936339,54854181,54853970,86056515,86054659,86089461,54852298,86027098,54851744,68787947,54851576,86100301,54850376,79826024,54849932,54849125,54849096,54849014,86056514,86089460,54846821,54846615,63046843,86011486,86054656,64143990,54844079,83620178,64754937,86027093,54839216,81475440,86089456,79936625,54833908,84818760,86089452,86100295,63050241,54827514,54826434,85075231,54825260,86048853,86089447,85968111,86100294,57096284,54821862,54821197,60881892,54820057,54818035,54817811,82701249,54817300,73438857,54816979,54816683,85461914,54815377,54814308,54813864,54813673,80164351,64058144,54810133,54809836,86100288,54809337,85207737,54808587,85850859,54807452,66148520,54807250,84954666,54805752,54805246,54804791,71208326,86011309,54803898,54803874,54802713,57440093,54801870,66142484,86100285,84930980,86011306,54800838,54800296,57648393,85516229,86056114,82610140,54798096,77723270,54797531,85450863,54796497,54796302,54796300,54795686,54795659,85450567,85450559,86054188,54794782,54794349,54794252,54794023,75622635,86100283,85449962,85449849,62482711,54792435,85449692,54792313,86011303,63047448,85449290,54790627,85449079,54789622,65105380,85352841,54788399,85448601,86089719,85448448,85448441,85448432,85448421,85448419,54787130,85448287,60830535,54786637,66394889,78869931,54785790,54785360,54785338,85447580,56749415,64099593,85447282,86089108,77763280,54782485,73438801,54782167,85447056,85446964,54781174,79904753,54781081,54780949,86089097,63047525,86089096,85446371,54778917,54778724,54778071,85445946,54842085,86048856,86100305,86089936,86089705,86089672,86089671,86089462,86089446,86089439,86089442,86089103,86089124,86089123,86089121,86089120,86057235,86057232,86056520,86054933,86054654,86054198,86054196,86054190,54788039,77535469,85890095,54782387,85446948,54781627,54796205,54779020,80294537,54777802,86049010,86048582,86033590,86027343,86027099,86027095,86026690,86026683,86026687,80170084,85825447,85851962,85968274,54907611,54869692,85890419,85443536,85771910,85825325,70377529,85851695,82261763,54841319,85825316,54837030,57857933,54834705,54833607,86020960,54824722,85825187,85850863,54810153,86108377,86108379,86108374,86108383,86108381,54952767,63243034,64868259,78626688,65606976,54952187,82765845,70619092,73438658,54951336,54950457,86100333,54949791,54949515,79666176,85968806,86100332,54947707,54947459,54947026,54839609,54946357,54946071,54945777,85826143,83750206,86089935,84341287,62024084,86054928,54942294,54942131,54942069,54941863,86054927,54940655,54940615,86100328,54939600,85968388,68417862,86057231,54936066,61446962,63992844,54935170,86100321,70818443,85454844,54933228,60886432,54932613,81390888,63046999,68790846,82978710,68786160,54930331,68439068,70512868,86089699,85349227,63049129,54928541,85912991,54927602,54927317,81579254,54926508,54797628,86054663,86100310,85394143,54914302,69203751,86011631,54912302,86089695,54910500,54909474,54908822,86089693,54907846,63892373,86054662,86089691,54903466,86027345,86089688,82978597,54810041,54809210,85825181,85850857,54805216,84818502,55673143,54798135,85505869,86011307,85968910,85968861,85968391,85968268,85967744,63755536,54950705,68786473,77769052,54838677,85531493,63051386,54940132,85852189,54937401,54936709,85516293,54935341,63047495,54934115,63046895,54933245,54932131,81704521,54930971,73438688,73438729,54927942,54927320,54921264,54915645,54915193,73438647,85451143,54908414,63049767,54902151,78324430,54897406,54895655,85531475,85207966,54860796,85531472,54855996,85516264,69203695,54855046,54853999,54851085,85531467,54849383,73438864,54847731,73743402,78760848,54845862,54845256,54844481,55278248,64020471,73438883,54831483,85771713,54827803,76185935,54820566,54818291,69224157,57217439,85531458,54833133,77944811,54812776,54810233,54809078,54808990,54808648,59108834,59108833,59108830,59108829,59108827,59108815,59108814,59108813,59108812,59108811,59107744,59107725,70503240,59107719,59107717,59107708,59107706,59107705,85919361,54807917,56747503,54804942,64682640,79936283,54803190,54802547,85919067,54801761,54801257,73438880,54800275,85918743,63046747,54797210,85918250,65332725,73438943,85450229,85505864,85450080,85427435,54790588,54788650,54788249,54787792,54786937,85448160,85516224,85516222,54784312,64062011,54783303,54782580,79134443,67495983,83398863,54778579,54777962,81837060,85825315,85912984,85912983,85912977,85912958,54923327,85890785,85890783,85890779,85890646,85890642,85890417,85890414,85890296,85890292,85779504,54949016,75398854,74155517,81575595,54839011,85779497,85454261,62868566,83421194,54831676,83655534,83189522,54932815,54931467,85785606,54823772,85460174,85451059,71329398,54835247,79936623,54825620,82730403,67440624,85460172,85506504,83599758,85460171,54810819,85461912,82155023,82149636,59107741,59107738,59107704,82644515,78607236,85516234,85851702,85851697,85851693,85516230,82699643,85850865,85850866,78892848,56172765,54792654,63056783,76123619,73639302,54786632,86033592,73438637,85913005,83092124,54942693,84844093,66673813,85516295,54938470,54938345,85912998,85912997,85631183,86027347,64009933,76530420,85912990,85890638,54914092,54913503,63052611,85890636,85890423,63047461,85631172,63052681,78884753,54848357,85890412,63483656,85912970,54825185,63051408,54831962,81838667,85207744,69410837,64763877,85890288,54814680,54814627,78079692,54813523,54810641,54807912,54801873,54800038,85918253,54793797,80161448,84085372,85779503,85852193,85779501,85852192,79975911,85779500,85779499,85968393,86021514,85785607,54939429,54933977,85851967,85775139,81928159,77597958,85785604,54913088,85775132,54818605,84855423,85850862,54815993,85771706,54812931,54794300,54793220,85824919,85824918,54792038,85460168,54788957,54788312,64118865,85447852,85771296,85771294,85447236,58061634,54782055,54781893,54779176,86011630,86011626,86011487,86011484,85968968,85968929,58180027,54784510,85447146,85446860,54849769,85825665,85825662,85825452,85825450,85825449,85825442,85825327,85825326,85825329,85825321,85825185,85825184,85824916,85824912,54953661,63332568,54953651,54953647,54953645,54953644,78626690,54953642,54953634,54953632,54953629,54953623,54953622,54953619,59257797,61410652,54953606,54953605,57995806,54953595,54953594,71818279,54953586,54953582,64047534,57176558,73066112,77123419,54953571,79059429,54953562,57029588,65368240,55478194,54953554,68278360,54953547,54830161,56579650,69360049,54953542,61831639,72583969,54953537,69533954,54953517,54953516,54953514,54953513,54953510,54953505,54953504,59013719,54953501,54953497,54953490,54953484,54953483,54953479,54953473,58954319,68447632,54953465,70472745,54953452,68259111,66125971,54953447,54953445,54953437,77536885,64042254,60826125,54953410,64128561,54953397,60719706,54953391,54953383,69116649,59045868,64424092,54953351,58268589,54953343,54953340,54953337,83805263,54953323,54953322,54953319,54953317,54953308,54953306,54839671,54953303,57087540,54953101,54826914,54953097,54953092,54953087,59042806,54953075,54953066,54983455,61151942,54953055,54953039,54953038,54953029,65745144,54953023,54953019,54835340,54953009,69093575,69179042,59020628,54952979,54952978,54952977,54830524,54952951,64112215,54952949,54952948,54952942,54952941,69379026,57984845,54952931,54952924,54952916,54952915,54952911,54952910,61368148,54952903,54952902,54832232,54952894,65477519,68961373,54952886,63871005,54952882,70587368,54952862,54952856,54952854,54952853,54952846,54952834,59256327,54952831,54952827,60931928,54952823,54952814,54952812,54952793,54952772,54952753,54952752,54952750,78284040,54952741,79978874,54952731,54952727,54952720,54952719,54952716,54952710,54952709,54952707,54952691,60741582,54952673,56549437,54952661,54952655,54952654,54829542,69304568,54831361,83139712,85458083,67130410,66147700,85516273,54904689,54902394,61128559,63051172,63051240,77334360,54898733,78633195,85775128,85453498,85516269,54857134,79978696,61431450,54854277,54853673,54853031,58103759,85454253,70380666,81408240,54848663,70581945,54846925,54846859,54846214,54845916,54844684,54844073,54843933,54952647,54952644,54952642,54824986,70675923,82129330,54952631,54952629,54952625,54952624,54952622,54952620,54952610,55278268,63333395,83230093,59421632,54952595,72299873,54952589,63862981,54952585,54831693,54952573,54952562,54952550,54952548,54952544,68788274,54952530,71556355,54952522,54952518,54952512,54827363,66130050,70358306,54829979,54952479,54952463,57494864,61781923,64424091,71352869,54952452,54952450,68625621,54952444,54952442,54952440,54952437,54952435}'::integer[])))
Planning time : 4.594 ms
Execution time : 50,120.511 ms