explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QiPL

Settings
# exclusive inclusive rows x rows loops node
1. 638.704 204,184.032 ↓ 1.4 9,976 1

Subquery Scan on window_results (cost=3,794,490.33..3,795,432.50 rows=6,979 width=404) (actual time=194,975.071..204,184.032 rows=9,976 loops=1)

  • Filter: (window_results.row_number <= 1)
  • Rows Removed by Filter: 1554023
2. 4,077.219 203,545.328 ↓ 74.7 1,563,999 1

WindowAgg (cost=3,794,490.33..3,795,170.78 rows=20,937 width=412) (actual time=194,975.056..203,545.328 rows=1,563,999 loops=1)

3. 17,891.923 199,468.109 ↓ 74.7 1,563,999 1

Sort (cost=3,794,490.33..3,794,542.67 rows=20,937 width=384) (actual time=194,974.370..199,468.109 rows=1,563,999 loops=1)

  • Sort Key: it_songs.name, am_playlists.id, am_playlist_listings.created_at DESC
  • Sort Method: external merge Disk: 486096kB
4. 3,137.671 181,576.186 ↓ 74.7 1,563,999 1

Nested Loop Left Join (cost=1,001.57..3,792,987.71 rows=20,937 width=384) (actual time=95.631..181,576.186 rows=1,563,999 loops=1)

5. 1,621.005 173,746.518 ↓ 74.7 1,563,999 1

Gather (cost=1,001.30..3,786,600.88 rows=20,937 width=303) (actual time=95.620..173,746.518 rows=1,563,999 loops=1)

  • Workers Planned: 7
  • Workers Launched: 0
6. 15,283.938 172,125.513 ↓ 522.9 1,563,999 1

Nested Loop (cost=1.30..3,783,507.18 rows=2,991 width=303) (actual time=86.185..172,125.513 rows=1,563,999 loops=1)

7. 35,298.638 156,841.568 ↓ 522.9 1,563,999 1

Nested Loop (cost=1.01..3,782,553.29 rows=2,991 width=122) (actual time=86.173..156,841.568 rows=1,563,999 loops=1)

8. 60,547.521 121,542.910 ↓ 522.9 1,563,999 1

Nested Loop (cost=0.57..3,781,159.81 rows=2,991 width=117) (actual time=86.158..121,542.910 rows=1,563,999 loops=1)

9. 60,899.727 60,899.727 ↓ 7.0 616 1

Parallel Seq Scan on it_songs (cost=0.00..2,463,401.71 rows=88 width=101) (actual time=0.042..60,899.727 rows=616 loops=1)

  • Filter: (id = ANY ('{1895825,9288853,9291923,9310699,9334489,9279895,9318527,6363912,4558329,8856,7827,9292231,4174129,4140856,4140739,6749805,6341787,6341407,5920821,4100484,4100819,4100414,4100398,4100349,5194083,4956665,4956656,9315706,9972715,6613497,6522856,4723103,9337826,9342054,9329554,2143700,1552295,3694735,9883,9334107,5667038,6021825,4140810,4140806,6174132,6174102,4687640,4575368,4170823,4170378,9282273,2143695,1715061,9819784,9747077,9729471,9729470,9718409,2172626,9463256,9430168,9416617,9354300,9340779,9275117,9263807,9180912,9166072,8616184,8401212,7997713,7939706,7771362,1720891,7649903,7632254,7611029,7559421,7531213,7491462,7463170,7452453,7449459,7424232,7395153,7360857,7309277,7268427,7260430,7127230,7087943,6937090,6909090,6900529,6883197,6776903,6764616,6619218,6604813,6547834,6545005,6536600,6493267,6469662,6458067,6449103,6446414,6365782,9259165,7380821,7095071,6334467,6243790,6234364,6220621,6164704,6162118,6156117,6154927,6150183,4607426,4528708,4512306,4467762,4451150,4433876,4413721,4413195,4408304,4403667,4394173,4394169,4394158,4394144,4393906,4393843,4393827,4393823,4393818,4393769,4393708,4389814,4388155,4388138,4388047,4388044,4388033,4388013,4387999,4387966,4387938,4387927,4387911,4387900,4387879,4387860,4384641,4375368,4371702,4371505,4359599,4323032,4321939,4298939,4281572,4281796,4276911,4252553,4207787,4180007,4171922,4161711,4159872,4159871,4157326,4157292,4157235,4157170,4157307,4143435,4140421,4128630,4125161,4104863,4103512,4093806,4083090,4048595,4044829,4044831,4044830,4020916,3987571,3965847,3812857,3762943,3755943,3755747,3704647,3704812,3697272,3600200,3587302,3509354,3402775,7079620,7068363,7065325,6866256,6649328,6649097,6499211,6471176,6390101,6331981,4114986,6174685,5577871,5504941,5375744,4955657,4817635,4501555,4468315,4393782,4347567,4162028,4157300,4125278,3948351,3752395,1925339,2148356,2486531,2486515,2486497,2486473,2486487,2486470,2486557,2486555,2486554,2486553,2486552,2486551,2486550,2486549,2486548,2486547,2486546,2486545,2486544,2486543,2486542,2486541,2486540,2486539,2486538,2486537,2486536,2486535,2486534,2486533,2486532,2486529,2486528,2486527,2486526,2486525,2486524,2486523,2486522,2486521,2486520,2486519,2486518,2486517,2486516,2486513,2486512,2486511,2486510,2486509,2486508,2486507,2486506,2486505,2486504,2486503,2486502,2486501,2486500,2486499,2486498,2486496,2486495,2486494,2486493,2486491,2486490,2486489,2486488,2486486,2486485,2486484,2486483,2486482,2486481,640060,6237446,205235,8378378,4170365,5961882,5956901,5919056,5919261,5846207,5846198,5846208,5846785,5846787,5810237,5777745,5756652,5690381,5671440,5606197,5605243,5587590,5587019,5545183,5467593,5363363,5187955,5164922,5144370,5120624,5116008,5054084,4998643,4987430,4987429,4984312,4948167,4889559,4157286,4775916,4717432,4716103,4716102,4702149,4672446,4650641,4650602,4650570,4650567,4639250,4632617,4632589,4630822,4614816,4607796,4607781,9335431,9317298,9304317,9259691,9252900,9144473,9039092,4711824,2098221,6863083,6583228,6234027,6233952,5846784,4379741,5601883,5370576,9876648,4104762,4500317,4408247,4393574,4387862,4371499,4261684,2486480,2486479,2486478,2486477,2486476,2486475,2486474,2486472,2486471,2486469,2486467,2405358,2256638,2249825,2236316,2178278,2127956,2117399,2105495,2094423,2068292,2015427,1979661,1925343,1897143,1895861,1895745,1882961,1825449,1733260,1731041,1725983,1724451,1721851,1720476,1719823,1717322,1714860,1713859,1710634,1710476,1710302,1710028,1710027,1710010,1710009,1710008,1710006,1710005,1709029,1708949,1708831,1708830,1708826,1708811,1708800,1708533,1708614,1708494,1708023,1707979,1615544,1609373,1553207,1553530,1549067,1548308,1544025,1539556,1537826,1528064,1503856,9212235,1475164,694392,694605,4157196,4061248,1908455,1908188,2486556,2486468,2486530,2486492,2239370,634916,496344,416991,411914,62262,17619,14242,12847,8889,8885,8887,8886,8893,8888,8626,8622,8618,8616,5433,5468,5435,5000,4267,7489102,6174693,4403017,7428774,7128081,7114255,7081315,7040853,6552289,6142418,5753401,5679975,5610300,5579706,5324087,5254140,5238387,5216338,5170010,5138054,5102959,5083804,5083408,5041239,4998556,4958147,4901884,4860577,4804728,4804727,4804726,4750170,4750169,4379666,4360097,1896141,1895900,1895762,1895999,1896136,1866068,1710022,1527784,1527611,1525420,1523915,4170356,3492420,3482110,3414210,3390390,2486514,2381274,2360964,2188997,2130057,2120852,2102816,2091810,2066426,1976195,1973740,1924070,1912613,1912306,1908795,1908788,1908662,1908210,1897085,1896877,1896217,1896117,1896065,1896043,1895991,1888709,1883453,1883434,1880149,1879885,1879853,1879762,1879462,1879152,1878940,1878847,1878744,1878712,1878697,1878692,1878689,1878629,1878623,1878604,6667881,6613311,1557988,4055816,4023806,4019197,3989587,3974751,3928956,3846983,3803820,3734973,3622418,3600201,3599946,3599944,3566222,3555658,3533798,3531462,3509301,3874036,51,1896015}'::integer[]))
  • Rows Removed by Filter: 8440718
10. 95.662 95.662 ↑ 2.5 2,539 616

Index Scan using index_am_playlist_listings_on_it_song_id on am_playlist_listings (cost=0.57..14,912.12 rows=6,240 width=20) (actual time=0.178..95.662 rows=2,539 loops=616)

  • Index Cond: (it_song_id = it_songs.id)
11. 0.020 0.020 ↑ 1.0 1 1,563,999

Index Scan using am_playlist_editions_pkey on am_playlist_editions (cost=0.43..0.46 rows=1 width=13) (actual time=0.020..0.020 rows=1 loops=1,563,999)

  • Index Cond: (id = am_playlist_listings.am_playlist_edition_id)
12. 0.007 0.007 ↑ 1.0 1 1,563,999

Index Scan using am_playlists_pkey on am_playlists (cost=0.29..0.31 rows=1 width=185) (actual time=0.007..0.007 rows=1 loops=1,563,999)

  • Index Cond: (id = am_playlist_editions.am_playlist_id)
13. 4,691.997 4,691.997 ↑ 1.0 1 1,563,999

Index Scan using am_curators_pkey on am_curators (cost=0.28..0.30 rows=1 width=89) (actual time=0.003..0.003 rows=1 loops=1,563,999)

  • Index Cond: (id = am_playlists.am_curator_id)
Planning time : 2.092 ms
Execution time : 204,307.228 ms