explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8QZs

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 1,257.545 ↓ 0.0 0 1

Sort (cost=463,324.54..463,324.57 rows=10 width=44) (actual time=1,257.544..1,257.545 rows=0 loops=1)

  • Sort Key: (sum(po_monthly_flart.nu_low_flart_files)) DESC
  • Sort Method: quicksort Memory: 25kB
2. 0.002 1,257.536 ↓ 0.0 0 1

Limit (cost=463,324.25..463,324.28 rows=10 width=44) (actual time=1,257.535..1,257.536 rows=0 loops=1)

3. 0.006 1,257.534 ↓ 0.0 0 1

Sort (cost=463,324.25..463,377.36 rows=21,244 width=44) (actual time=1,257.533..1,257.534 rows=0 loops=1)

  • Sort Key: po_project_sub.id_project, (sum(po_monthly_flart.nu_low_flart_files)) DESC
  • Sort Method: quicksort Memory: 25kB
4. 0.004 1,257.528 ↓ 0.0 0 1

GroupAggregate (cost=462,015.42..462,865.18 rows=21,244 width=44) (actual time=1,257.527..1,257.528 rows=0 loops=1)

  • Group Key: po_project_sub.id_project
5. 0.006 1,257.524 ↓ 0.0 0 1

Sort (cost=462,015.42..462,068.53 rows=21,244 width=24) (actual time=1,257.523..1,257.524 rows=0 loops=1)

  • Sort Key: po_project_sub.id_project
  • Sort Method: quicksort Memory: 25kB
6. 0.518 1,257.518 ↓ 0.0 0 1

Hash Join (cost=20,235.50..460,488.53 rows=21,244 width=24) (actual time=1,257.518..1,257.518 rows=0 loops=1)

  • Hash Cond: (po_proj_sub_infra.id_project_sub = po_project_sub.id_project_sub)
7. 0.004 954.611 ↓ 0.0 0 1

Hash Join (cost=15,527.26..455,488.18 rows=21,244 width=24) (actual time=954.610..954.611 rows=0 loops=1)

  • Hash Cond: (po_monthly_flart.id_infra_instan = po_proj_sub_infra.id_infra_instan)
8. 0.011 954.607 ↓ 0.0 0 1

Append (cost=6,932.15..426,076.51 rows=716,665 width=24) (actual time=954.606..954.607 rows=0 loops=1)

9. 86.861 158.514 ↓ 0.0 0 1

Bitmap Heap Scan on po_monthly_flart (cost=6,932.15..229,193.71 rows=337,424 width=24) (actual time=158.513..158.514 rows=0 loops=1)

  • Recheck Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
  • Filter: (id_enterprise = 83)
  • Heap Blocks: exact=81,274
10. 71.653 71.653 ↓ 1.0 372,299 1

Bitmap Index Scan on index_monthly_to_id_tseries (cost=0.00..6,847.80 rows=370,579 width=0) (actual time=71.652..71.653 rows=372,299 loops=1)

  • Index Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
11. 82.500 796.082 ↓ 0.0 0 1

Bitmap Heap Scan on po_monthly_flart_83 (cost=8,227.57..196,882.80 rows=379,241 width=24) (actual time=796.081..796.082 rows=0 loops=1)

  • Recheck Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
  • Filter: (id_enterprise = 83)
  • Heap Blocks: exact=76,417
12. 713.582 713.582 ↑ 1.0 372,299 1

Bitmap Index Scan on po_monthly_flart_83_id_tseries_idx (cost=0.00..8,132.76 rows=379,241 width=0) (actual time=713.581..713.582 rows=372,299 loops=1)

  • Index Cond: (id_tseries = ((date_trunc('month'::text, (('now'::cstring)::date)::timestamp with time zone) + '1 mon'::interval) - '1 day'::interval))
13. 0.000 0.000 ↓ 0.0 0

Hash (cost=8,437.58..8,437.58 rows=12,602 width=8) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Index Scan using index_po_proj_sub_infra_id_project_sub on po_proj_sub_infra (cost=0.42..8,437.58 rows=12,602 width=8) (never executed)

  • Index Cond: (id_project_sub = ANY ('{184103,264124,162824,77767,165893,59212,264049,162825,54289,265050,57628,198430,264073,39487,57550,61110,62077,162828,62354,54417,165668,79164,162365,264074,198513,54290,162374,264125,55311,137501,162427,206308,264757,222658,264326,206370,182533,182544,186314,206175,182534,182548,206318,186313,189934,264763,182541,182539,182536,182535,182538,187223,182537,201634,182543,186312,252754,189933,182542,182540,222643,264426,204496,263619,222614,204501,264407,263620,264444,61781,54571,53767,87185,53736,196246,61782,77939,138328,138329,54281,76820,77927,204064,263520,187286,206278,77757,77761,169080,206218,253329,206192,169081,264781,264398,264778,206210,264390,38179,169082,169083,77881,76871,197423,197424,76869,206262,206314,206196,264745,263526,54282,62520,200547,194349,189935,252755,201488,165393,204502,263275,204469,204470,204471,204070,61118,64407,62094,58991,252756,165395,222752,62378,254752,165397,253379,198397,263684,264945,184227,162922,206915,165669,263685,263686,184181,206191,165399,186535,265016,263276,184283,264649,184091,264334,184163,61103,252757,264679,184194,239990,184257,184281,186602,165403,184205,60438,201609,156250,264683,264386,184253,186603,184204,165407,165408,165409,165410,153342,201490,206916,184262,162843,165412,165413,184225,184211,184246,186604,184237,184174,64362,254692,165419,253380,60594,184232,184256,184266,184173,184208,183963,186605,184282,184209,184178,165422,184276,184165,263277,184284,186606,53719,64401,58951,53050,57624,165427,264768,264423,162434,263687,40060,187345,54103,53769,162436,265045,263688,80656,57531,84904,76872,79187,187346,206251,263278,204618,222686,204422,264705,264361,53031,263689,54283,162437,252595,62091,76866,137178,184867,187337,184868,77763,184869,184870,187339,252758,264486,239991,263690,76771,169084,88796,198514,187340,53771,61119,264696,264335,79189,77760,162845,263691,85077,142738,88797,62088,40042,77770,165263,165428,264733,264724,264387,264391,53773,162440,263692,197369,53754,162442,162443,162444,263693,201661,201662,206317,264313,264367,187328,156140,53724,53725,56952,76902,206282,253371,198432,162446,264126,196477,252759,198172,198175,198164,196481,264691,197370,155370,198176,197396,197400,187001,196486,198168,198174,196476,197395,198171,197371,198167,189937,196491,198182,198170,196480,198169,252760,198173,239992,264344,222706,239978,53009,187262,53756,187362,40068,206279,263543,53777,264712,264368,59240,62474,240508,240509,64359,75840,184068,165429,64358,184230,201665,184224,165431,156246,184260,165433,184186,201641,264686,264362,265049,187285,222701,204811,204443,222702,204812,204445,239979,64412,162447,52715,57444,53780,187326,264534,53781,57409,162846,264075,54558,53782,53784,61784,57535,57413,198495,264027,56814,264710,264369,264718,263623,264487,252761,239980,254713,242489,264697,264345,264714,264392,162847,162848,162849,162850,53755,184278,186607,169085,54079,165435,204205,64408,254771,252762,222728,184105,264648,184101,264327,165436,138337,81030,146824,57523,62080,53785,200015,198434,54445,162451,77762,138331,264699,264346,162851,162852,263536,254714,264704,242490,165437,184085,184079,184207,224567,184255,204472,154058,184267,184239,162452,162453,184235,184217,184228,184275,184191,184216,165438,162853,156247,184277,206296,254791,253372,264700,264448,54562,206274,61121,77605,77885,206300,253373,206261,254772,253374,40062,88657,77753,53788,53793,53794,198515,187354,38191,53795,264800,264314,162455,87219,146825,126028,64403,162854,126020,162855,38194,165301,39884,57637,222687,254796,204619,253375,204423,61785,39503,206226,264729,264370,187363,184176,264662,263279,200016,162923,263862,198427,263863,264540,126021,53568,60272,252763,222729,89523,56965,57534,61122,263864,62090,54102,160759,254691,252764,160757,194374,194370,222730,204392,53679,206252,252765,222731,206254,53757,80654,187336,81028,57394,138341,189938,165440,42504,53797,57419,162459,53578,54425,206239,253376,198490,263280,84619,54420,198408,263865,264523,162462,263866,162463,60273,126029,197442,197521,206288,76764,162467,263867,187365,38181,53753,187310,162856,263868,52320,162857,263869,53799,53800,53801,254773,253377,77758,198475,187351,54461,264727,264371,206917,190017,252766,184261,239967,137179,57520,61786,53049,138330,187364,142737,39484,60274,206256,253378,79468,206188,252767,222732,206216,53806,198524,76787,169086,165442,263281,137547,222703,204813,204446,53807,162471,264076,254585,184168,223106,50070,263282,162858,206266,254536,142751,200017,200014,262980,252768,200548,262981,222672,187303,57540,187320,162472,53030,162473,262982,262983,200022,184223,76873,57570,264795,264408,138193,80782,200023,262984,58617,77604,206918,206173,239968,239969,206375,222673,197464,197405,198138,197417,198139,197401,197414,197416,197412,197403,198145,197410,198142,197413,198127,198137,198150,198144,197409,197406,198187,198140,198152,198153,189171,198134,198128,197475,198141,197402,224405,198148,197418,198131,197415,197411,198135,198146,198151,198130,197408,197404,198126,198133,197407,198191,197419,198188,197472,197477,197483,197481,197484,197422,197474,197420,198185,197421,62376,61104,61105,77928,58646,224537,58994,184215,252769,186534,222674,186536,165446,61108,264676,200020,262985,264372,57571,264685,200019,262986,252770,239970,262987,201610,187321,187322,187305,200025,58634,58636,58633,187304,206919,262988,186317,201648,262989,200013,165447,61142,165448,162475,206243,263537,206289,264427,162924,264127,162476,162477,165449,75841,198480,264944,252771,264682,194373,222650,222675,194386,265029,263538,254756,252772,194372,222676,254757,194391,253321,265028,194376,263539,254758,194390,253322,264661,254759,194423,253323,264442,265027,263540,265026,194383,263541,194393,194375,265025,263542,156207,263189,264399,254732,253312,187357,184222,184196,265024,206920,263284,204539,252773,222677,200026,184263,200549,197379,197560,197597,197571,197562,197561,197607,169087,162479,165450,206195,206272,264717,264412,264706,264363,254715,253313,254716,242495,264701,264355,206184,263285,165451,197555,254797,204620,222688,204424,253314,264077,38188,169088,162925,264128,165453,264726,206207,165452,201663,264364,206756,53726,206270,206271,201667,201666,198479,168025,182550,182549,252774,186319,222678,49402,165454,162482,264129,264542,138191,57862,42505,264668,264432,162483,206292,263535,222689,204621,204425,252775,206215,222679,60275,254774,253315,56878,264744,153812,264719,252776,206203,196483,197615,264437,264315,222680,162486,264546,187324,206320,138190,80807,78601,78604,60641,56802,49382,122495,162860,162861,79359,254792,253316,162487,264078,187314,61787,198162,54301,81025,264715,264413,254793,253317,56806,76768,198092,197556,206186,263289,198400,264079,187329,197492,184059,254689,253318,264678,265023,184187,263290,264404,186608,162489,264673,194378,252777,239975,252778}'::integer[]))
15. 152.661 302.389 ↑ 1.0 140,174 1

Hash (cost=2,955.33..2,955.33 rows=140,233 width=8) (actual time=302.388..302.389 rows=140,174 loops=1)

  • Buckets: 262,144 Batches: 1 Memory Usage: 7,524kB
16. 149.728 149.728 ↑ 1.0 140,174 1

Seq Scan on po_project_sub (cost=0.00..2,955.33 rows=140,233 width=8) (actual time=0.011..149.728 rows=140,174 loops=1)

Planning time : 17.023 ms
Execution time : 1,257.895 ms