explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4nPK

Settings
# exclusive inclusive rows x rows loops node
1. 239,703.845 296,714.683 ↓ 1,541.0 1,541 1

Nested Loop (cost=11.39..8,935.24 rows=1 width=552) (actual time=626.972..296,714.683 rows=1,541 loops=1)

2. 538.578 1,612.538 ↓ 80,991.7 971,900 1

Nested Loop (cost=10.96..942.96 rows=12 width=548) (actual time=0.024..1,612.538 rows=971,900 loops=1)

3. 2.526 2.526 ↓ 1,421.0 1,421 1

Index Scan using "BusinessTypesIsSelectableIndex" on "BusinessTypes" "businessTypes" (cost=0.29..4.31 rows=1 width=540) (actual time=0.013..2.526 rows=1,421 loops=1)

  • Index Cond: ("isSelectable" = true)
  • Filter: "isSelectable
4. 969.122 1,071.434 ↓ 2.4 684 1,421

Bitmap Heap Scan on "BusinessTypesToBusinesses" "businessTypes->BusinessTypesToBusinesses" (cost=10.67..935.76 rows=289 width=8) (actual time=0.106..0.754 rows=684 loops=1,421)

  • Recheck Cond: ("BusinessTypeId" = "businessTypes".id)
  • Heap Blocks: exact=388,814
5. 102.312 102.312 ↓ 2.4 686 1,421

Bitmap Index Scan on "BusinessTypesToBusinesses_BusinessTypeId_BusinessId_pk" (cost=0.00..10.60 rows=289 width=0) (actual time=0.072..0.072 rows=686 loops=1,421)

  • Index Cond: ("BusinessTypeId" = "businessTypes".id)
6. 55,398.300 55,398.300 ↓ 0.0 0 971,900

Index Only Scan using "Businesses_pkey" on "Businesses" "Business" (cost=0.43..666.01 rows=1 width=4) (actual time=0.056..0.057 rows=0 loops=971,900)

  • Index Cond: ((id = ""businessTypes->BusinessTypesToBusinesses"".""BusinessId"") AND (id = ANY ('{1020633,108919,849251,471659,454194,454173,794051,601825,473257,870275,676861,317003,231334,129920,116455,669929,652,180035,203267,300031,5545,420948,216218,836096,12982,832702,308621,203880,186547,233431,202537,391121,870205,624407,557224,970913,514676,119813,836005,157561,900125,129787,984126,418665,654245,959597,984121,603232,218364,213060,202525,74261,810716,261181,330062,217263,377399,577110,4963,1005414,180100,37632,9057,928166,1025797,678421,520742,594203,22685,829377,474798,724647,836098,966947,885437,551966,854334,717873,836675,602327,224461,174591,530113,798267,483109,806932,448207,923713,602883,424186,199717,100461,620568,389866,322637,391324,316996,188382,185048,152620,426349,829006,955845,85804,829098,149646,922913,648548,403854,339824,483158,382981,382968,3968,755957,4859,9058,250413,914441,5023,138516,317294,8915,1053992,955838,696558,199,296869,602767,903429,900023,915078,85768,720690,280915,923374,808239,386785,555864,766439,922935,617574,7792,423691,445379,3761,9049,828963,854270,74763,85766,461700,570291,388396,625236,603335,416113,749383,792946,654437,811265,188423,686231,602486,829905,829926,848461,922609,343742,1059111,781375,557279,129775,528874,858488,382563,858493,692,95415,191366,1005405,325629,276706,251363,602909,711310,129866,217671,684458,594424,319489,423581,218359,935809,724663,44,12534,686257,856131,724585,231537,219992,423703,594485,739885,129519,829998,854324,80426,890663,4368,930042,819281,839523,742837,41,876795,414512,720468,854256,3496,577154,879803,122447,900901,144866,300619,317137,3053,307430,307481,286409,555933,891293,922648,846700,264207,906919,832985,861954,368713,737314,696722,333329,925202,129329,880741,624093,559748,80433,556224,563184,1017754,862389,1038928,167270,265643,333406,202527,59035,129790,474813,3023,950199,602432,318155,929020,835967,907128,654204,217589,883942,678768,472429,848446,935776,231715,400087,725422,755698,100493,2993,700775,623685,85283,5561,188996,720490,251690,798308,474822,819241,411156,791549,847554,922951,863315,286419,120431,836636,454402,849819,245795,129733,371529,724822,391919,182828,423526,424133,404120,7624,9862,386341,206143,732,9863,195,192,9864,3750,644428,625008,430337,110859,696094,751866,870284,423663,644575,205805,422098,231560,404293,216414,796592,585444,85088,251489,624941,982012,3128,4830,343754,90352,44658,217608,301021,756382,337903,382240,5041,188411,798475,8916,8917,893297,266389,830920,382993,837951,423593,931989,9055,111973,317291,688127,555993,770241,197922,91632,318234,3772,829104,871246,688048,391118,836085,3225,829391,870265,199679,9059,473089,943927,203,483193,424095,161938,960036,307561,128875,8918,594078,849825,881502,870176,867243,752983,603395,891312,317188,828574,206032,307542,798289,14819,217629,129768,129907,571755,117691,285680,473005,325270,471688,85932,193352,200727,453189,306638,737293,471653,1041069,836697,396112,6384,848475,836103,317069,472422,847551,746,2914,5077,340709,770085,861948,474820,22711,85461,821216,910345,847591,167695,129721,129793,307535,9051,858169,915099,870271,188361,307359,624158,623797,624798,910339,213063,424123,593573,405615,348,796598,959725,129372,382988,933801,594538,625273,213035,6025,815295,815238,808764,836026,831442,128957,799717,811246,603360,129818,400769,577061,576572,59010,9048,85234,318208,4958,833646,189006,9050,1023490,545497,535628,442624,732096,847579,579415,506941,382565,966161,167104,672716,672684,811186,382916,804466,100382,819275,669779,454038,309656,6041,3135,693758,953689,474664,197929,1828,474817,829036,976570,2550,654261,304671,231557,8562,915137,414503,957317,3479,169805,3005,86077,910487,6023,128109,261780,440126,317073,85895,423650,530473,423660,602062,1930,261789,348019,810748,899105,858491,199067,604230,295034,317092,99660,2429,256,39180,2029,473425,922807,374150,625352,603462,836093,317193,3024,317185,404090,962093,356742,1004219,262789,300967,339082,451059,822300,2995,356234,391899,411194,111979,623867,938111,196607,22033,565119,796589,157243,197744,861515,819356,836628,953619,41327,319724,319934,129780,832380,779726,754301,2996,3002,770540,261843,1051163,631849,915126,953045,798255,187857,830374,261740,85890,936792,836105,793571,423633,928163,308598,3058,85881,414508,624588,910350,866535,339143,86101,348027,959680,836609,716535,708465,382994,828592,929019,9204,271225,261765,938985,654178,141116,912693,1031366,1766,414510,122414,684855,577781,869978,860781,222022,601993,215083,423692,815883,624870,1005438,1816,869969,935801,905825,125516,423639,319953,307498,382509,193347,882347,4226,320623,5575,203801,91861,5611,12993,301001,245823,812107,1001506,309914,117671,84992,819286,423699,453123,795394,129850,788741,755685,111863,875227,915145,932899,129747,594345,85354,624497,129658,836042,8550,129353,403782,936441,382558,95258,182929,713291,870270,43,455700,748096,217138,748127,922640,95272,713350,182937,748057,474596,202516,2443,116483,761138,374135,664954,836694,472999,3008,594160,938993,1794,222309,388251,852671,474597,129632,338517,456226,391902,211863,625061,623917,342140,288356,858558,791416,342134,479074,915085,821196,821204,2661,197935,837149,862395,720191,447707,786826,307551,534597,923385,307334,158,483049,870243,423649,910494,222169,86097,913522,474481,129687,796466,798293,915261,190870,914828,2196,128072,856122,883960,166413,828980,348011,876799,593547,8529,471690,730758,428885,810528,86069,1001785,157150,137498,594288,711292,624224,237430,954911,799325,890787,318230,810196,802457,174822,928920,1056908,2335,5605,333143,711308,173284,317169,129739,150902,3156,9203,9209,798485,423589,4378,280600,565059,180816,858278,253499,4995,900117,333367,865151,923379,654416,9039,942806,4343,602810,122431,724634,603672,317161,905832,429145,4956,718599,195150,654161,420002,5014,74668,202512,95352,279672,279019,278789,278104,8134,9659,830769,281805,307922,281774,281824,279915,279658,278319,279890,279850,173128,280278,281816,734590,822556,6691,8136,9052,870276,8135,969540,129833,442076,180,960032,623961,867247,374106,404142,317348,828585,6038,423653,202521,848522,423601,317143,796590,809003,6057,395967,964900,959731,783376,920374,85536,424151,309790,308673,3144,396159,910516,8594,872392,9660,693150,266049,191143,3881,301013,273655,809600,891308,129726,867935,617849,231283,111856,415208,129441,318176,822016,798219,849810,862532,318239,822036,234860,318624,453127,4340,9047,216358,382570,397640,348303,216975,423560,603533,474809,410582,6031,839544,472417,910353,216708,178867,8062,737566,935831,266147,348295,835840,831612,266118,831403,923388,218356,1005440,203663,910361,9206,137817,294932,374125,421035,188986,4337,750715,9046,188394,466848,317195,213142,2122,880304,221327,4206,479041,466852,83689,309619,213057,648504,831395,968182,266409,277210,37633,161995,39043,810084,951589,3503,3512,654138,669748,390909,234477,317027,222687,935782,213026,5584,599687,317155,174937,421184,167077,304604,338401,197234,415217,2974,159776,382929,410322,709039,120484,7250,849693,182303,895347,847557,792929,59020,4893,836680,786804,720734,832424,128817,483031,654196,5050,718361,4254,9060,828630,619901,967500,231669,384209,382950,737689,374548,202548,382551,808767,125701,4839,411185,317113,423658,959564,958545,2268,898274,897220,213070,812719,862204,963251,831610,431984,840025,423670,968058,5064,840653,83665,338277,831622,423673,5243,709494,433,168790,932539,1650,3867,665007,85483,235473,391323,835837,833001,625311,199107,922920,164907,802476,266087,861939,718475,213201,305773,836616,723536,12868,891190,388255,829895,137463,845949,333130,682273,3037,403075,829230,404102,129703,9056,63742,64399,63400,840978,828659,382560,748799,441044,12994,836672,922914,471676,251711,604072,603998,411469,804039,770402,430101,736,474803,603643,307518,654108,614439,836020,308611,188406,167170,167157,420949,858056,9208,483095,836623,836010,922771,603035,217657,85308,832365,303247,213050,798361,798236,958659,922947,924869,832388,100391,923709,278,5045,159746,770676,530070,414505,318198,910570,144479,419992,819384,396014,5464,5463,654214,322115,932118,576480,828542,724608,617764,891332,205842,361083,218362,152774,396192,213042,829438,829412,9053,435535,314044,602593,216490,264814,2909,770525,194460,781855,231459,461831,895338,957329,924862,983229,474616,423667,101779,922692,218355,556072,304691,132573,9054,808717,808721,836029,830780,2046,954890,59042,870252,12865,566148,828612,731555,5040,803739,829426,819378,837881,261108,261112,723902,423738,579816,3892,412599,682242,479065,20353,319281,423417,216301,319422,910334,319451,319796,382753,731579,159507,921232,1042699,159576,258597,808739,836638,836641,836643,836646,936786,167122,780076,613105,798351,751924,808998,994987,129901,625102,441078,794049,617713,821178,403072,830255,915113,427547,498820,888217,915110,890815,461838,1005445,764809,5582,915107,796596,300651,9273,423552,779960,483287,85925,731835,932106,483058,858873,416117,542503,403931,269311,64855,854541,317200,137532,99703,545851,422585,625194,921222,1009314,2721,317215,915118,819230,809614,5021,603695,908343,268895,384503,794748,125749,819317,836612,54702,286798,301048,530011,364115,169478,8593,388257,530097,812068,11757,338527,829402,385176,602135,829114,545717,22715,23022,914835,128930,798247,318705,318723,880142,27754,318751,769940,920380,261175,160765,720151,915131,4325,678446,85424,483005,896809,4043,173151,910355,829888,210729,188414,69026,921497,950039,898906,854343,754743,382514,474314,831714,388250,237450,978973,219121,219130,267003,633185,823289,203823,347046,624720,736899,78932,307472,307506,836690,893291,608967,251506,443587,443585,443592,736379,1055319,931935,884938,883957,380634,925998,332347,226243,819299,935814,431850,931990,231484,835839,835835,832413,861527,4779,1031363,213005,429100,288367,829008,324291,891301,3769,907126,914843,571683,798319,411213,915090,858450,427987,13076,891318,340965,543719,455689,324425,840639,959614,423637,736969,83003,404063,46,798340,682191,664865,837877,781873,816120,686260,85246,203833,811230,317177,799522,9476,720228,923056,461605,86123,169793,344274,784876,129931,683470,129859,815609,307531,469762,835832,847695,382568,678514,427627,770464,964590,575283,693526,862127,703497,796471,74749,2958,85561,289692,909204,39182,829408,129842,718498,793969,326231,85915,129812,4321,108941,414506,835847,835850}'::integer[])))
  • Heap Fetches: 1,541
Planning time : 1.709 ms
Execution time : 296,715.240 ms