explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ajgk

Settings
# exclusive inclusive rows x rows loops node
1. 25.147 146,634.249 ↑ 70,610.6 3,408 1

Sort (cost=425,979,681,074.93..425,980,282,677.50 rows=240,641,025 width=4,714) (actual time=146,633.345..146,634.249 rows=3,408 loops=1)

  • Sort Key: dn.document_id, oq.n
  • Sort Method: quicksort Memory: 13924kB
2.          

CTE cte

3. 1.782 9.038 ↑ 9.6 4,527 1

Recursive Union (cost=4.87..6,929.96 rows=43,456 width=92) (actual time=0.047..9.038 rows=4,527 loops=1)

4. 0.119 0.146 ↑ 1.4 53 1

Bitmap Heap Scan on og_theme ogt (cost=4.87..175.86 rows=76 width=92) (actual time=0.044..0.146 rows=53 loops=1)

  • Recheck Cond: (parent_id IS NULL)
  • Heap Blocks: exact=43
5. 0.027 0.027 ↑ 1.4 53 1

Bitmap Index Scan on ogt_parentid_idx (cost=0.00..4.85 rows=76 width=0) (actual time=0.027..0.027 rows=53 loops=1)

  • Index Cond: (parent_id IS NULL)
6. 4.559 7.110 ↑ 4.8 895 5

Hash Join (cost=426.69..588.50 rows=4,338 width=92) (actual time=0.532..1.422 rows=895 loops=5)

  • Hash Cond: (ie.theme_nkey = ogt_1.parent_id)
7. 0.235 0.235 ↓ 1.2 905 5

WorkTable Scan on cte ie (cost=0.00..15.20 rows=760 width=72) (actual time=0.000..0.047 rows=905 loops=5)

8. 1.174 2.316 ↑ 1.4 4,474 1

Hash (cost=345.75..345.75 rows=6,475 width=117) (actual time=2.316..2.316 rows=4,474 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 721kB
9. 1.142 1.142 ↑ 1.4 4,527 1

Seq Scan on og_theme ogt_1 (cost=0.00..345.75 rows=6,475 width=117) (actual time=0.007..1.142 rows=4,527 loops=1)

10. 2,319.010 146,609.102 ↑ 70,610.6 3,408 1

Merge Left Join (cost=533,658,051.41..424,970,684,980.05 rows=240,641,025 width=4,714) (actual time=137,538.294..146,609.102 rows=3,408 loops=1)

  • Merge Cond: ((dn.org_id = special_kinds.org_id) AND (dn.document_id = special_kinds.document_id))
11. 5.220 117,806.863 ↑ 70,610.6 3,408 1

Nested Loop Left Join (cost=529,355,888.66..418,358,531,515.64 rows=240,641,025 width=4,042) (actual time=116,855.295..117,806.863 rows=3,408 loops=1)

12. 2.639 117,774.379 ↑ 70,610.6 3,408 1

Nested Loop Left Join (cost=529,355,700.58..373,094,773,435.19 rows=240,641,025 width=4,017) (actual time=116,855.230..117,774.379 rows=3,408 loops=1)

13. 5.041 117,032.204 ↑ 70,610.6 3,408 1

Nested Loop Left Join (cost=529,354,875.15..174,457,664,363.94 rows=240,641,025 width=3,899) (actual time=116,854.464..117,032.204 rows=3,408 loops=1)

14. 11.447 116,877.211 ↑ 70,610.6 3,408 1

Merge Left Join (cost=529,354,152.41..531,176,732.42 rows=240,641,025 width=3,828) (actual time=116,854.237..116,877.211 rows=3,408 loops=1)

  • Merge Cond: ((dn.org_id = dn3.org_id) AND (dn.document_id = ogfd.document_id))
15. 18.139 116,753.607 ↑ 70,610.6 3,408 1

Sort (cost=526,692,215.57..527,293,818.13 rows=240,641,025 width=3,807) (actual time=116,749.844..116,753.607 rows=3,408 loops=1)

  • Sort Key: dn.org_id, dn.document_id
  • Sort Method: quicksort Memory: 10253kB
16. 4.730 116,735.468 ↑ 70,610.6 3,408 1

Merge Join (cost=95,568,152.29..99,213,028.64 rows=240,641,025 width=3,807) (actual time=116,725.746..116,735.468 rows=3,408 loops=1)

  • Merge Cond: (cte.theme_nkey = oq.theme_id)
17. 5.459 18.944 ↑ 9.6 4,526 1

Sort (cost=4,216.81..4,325.45 rows=43,456 width=104) (actual time=16.142..18.944 rows=4,526 loops=1)

  • Sort Key: cte.theme_nkey
  • Sort Method: quicksort Memory: 2419kB
18. 13.485 13.485 ↑ 9.6 4,527 1

CTE Scan on cte (cost=0.00..869.12 rows=43,456 width=104) (actual time=0.049..13.485 rows=4,527 loops=1)

19. 0.617 116,711.794 ↑ 4,113.1 3,408 1

Materialize (cost=95,563,935.48..95,634,022.88 rows=14,017,481 width=3,719) (actual time=116,709.498..116,711.794 rows=3,408 loops=1)

20. 14.863 116,711.177 ↑ 4,113.1 3,408 1

Sort (cost=95,563,935.48..95,598,979.18 rows=14,017,481 width=3,719) (actual time=116,709.485..116,711.177 rows=3,408 loops=1)

  • Sort Key: oq.theme_id
  • Sort Method: quicksort Memory: 8819kB
21. 4.224 116,696.314 ↑ 4,113.1 3,408 1

Hash Join (cost=14,213,197.81..71,477,515.25 rows=14,017,481 width=3,719) (actual time=94,295.006..116,696.314 rows=3,408 loops=1)

  • Hash Cond: (author.group_id = author_group.id)
22. 5.561 116,608.805 ↑ 4,113.1 3,408 1

Hash Join (cost=14,195,005.98..71,266,583.06 rows=14,017,481 width=3,678) (actual time=94,209.984..116,608.805 rows=3,408 loops=1)

  • Hash Cond: (da.author = author.id)
23. 7.706 116,220.159 ↑ 4,113.1 3,408 1

Hash Left Join (cost=14,101,967.03..70,980,803.74 rows=14,017,481 width=3,656) (actual time=93,823.955..116,220.159 rows=3,408 loops=1)

  • Hash Cond: (d.vdelo_prepared = u5.id)
24. 8.110 115,772.194 ↑ 4,113.1 3,408 1

Hash Left Join (cost=13,981,585.01..70,807,007.34 rows=14,017,481 width=3,593) (actual time=93,378.093..115,772.194 rows=3,408 loops=1)

  • Hash Cond: (d.vdelo_signed = u6.id)
25. 8.878 115,318.346 ↑ 4,113.1 3,408 1

Hash Left Join (cost=13,861,203.00..70,633,257.67 rows=14,017,481 width=3,530) (actual time=92,926.383..115,318.346 rows=3,408 loops=1)

  • Hash Cond: (d.creator = u7.id)
26. 2.343 114,865.521 ↑ 4,113.1 3,408 1

Nested Loop (cost=13,740,820.98..70,322,069.70 rows=14,017,481 width=3,467) (actual time=92,476.655..114,865.521 rows=3,408 loops=1)

  • Join Filter: (dn.document_id = da.document_id)
27. 6.086 114,849.546 ↑ 4,700.4 3,408 1

Hash Join (cost=13,740,820.42..49,862,808.49 rows=16,018,931 width=3,483) (actual time=92,476.586..114,849.546 rows=3,408 loops=1)

  • Hash Cond: (dr.recipient = recipient.id)
28. 7.998 114,428.357 ↑ 4,667.5 3,432 1

Hash Left Join (cost=13,620,438.40..49,522,212.46 rows=16,018,931 width=3,420) (actual time=92,058.926..114,428.357 rows=3,432 loops=1)

  • Hash Cond: (d.prepared_by = u3.id)
29. 8.151 113,979.770 ↑ 4,667.5 3,432 1

Hash Left Join (cost=13,500,056.39..49,208,898.44 rows=16,018,931 width=3,357) (actual time=91,612.419..113,979.770 rows=3,432 loops=1)

  • Hash Cond: (d.info_author = u4.id)
30. 21,954.105 113,531.264 ↑ 4,667.5 3,432 1

Hash Join (cost=13,379,674.37..49,022,577.16 rows=16,018,931 width=3,294) (actual time=91,166.052..113,531.264 rows=3,432 loops=1)

  • Hash Cond: (dn.document_id = d.id)
31. 2.649 2,047.522 ↑ 4,667.5 3,432 1

Nested Loop (cost=301,421.01..17,858,957.48 rows=16,018,931 width=3,045) (actual time=1,609.025..2,047.522 rows=3,432 loops=1)

  • Join Filter: (dn.document_id = dr.document_id)
32. 4.179 2,034.649 ↑ 96.3 3,408 1

Nested Loop Left Join (cost=301,420.44..16,460,283.73 rows=328,096 width=3,029) (actual time=1,609.005..2,034.649 rows=3,408 loops=1)

33. 4.027 2,013.510 ↑ 96.7 3,392 1

Nested Loop Left Join (cost=301,394.15..7,824,997.75 rows=328,096 width=2,785) (actual time=1,608.969..2,013.510 rows=3,392 loops=1)

34. 5.194 2,002.699 ↑ 21.5 3,392 1

Hash Join (cost=301,393.58..6,211,892.59 rows=72,821 width=2,772) (actual time=1,608.956..2,002.699 rows=3,392 loops=1)

  • Hash Cond: (dn.org_id = org_r.id)
35. 4.431 1,935.597 ↑ 21.5 3,392 1

Nested Loop Left Join (cost=283,201.76..6,192,699.47 rows=72,821 width=2,723) (actual time=1,545.545..1,935.597 rows=3,392 loops=1)

36. 2.407 1,917.642 ↑ 21.5 3,381 1

Hash Left Join (cost=283,200.48..5,558,499.61 rows=72,821 width=2,652) (actual time=1,545.525..1,917.642 rows=3,381 loops=1)

  • Hash Cond: (doga.republic_area_id = ora.id)
37. 4.161 1,914.718 ↑ 21.5 3,381 1

Nested Loop Left Join (cost=283,143.95..5,558,155.07 rows=72,821 width=2,636) (actual time=1,544.989..1,914.718 rows=3,381 loops=1)

38. 3.560 1,791.901 ↑ 13.1 3,296 1

Nested Loop Left Join (cost=283,142.98..3,714,372.63 rows=43,059 width=2,274) (actual time=1,544.884..1,791.901 rows=3,296 loops=1)

39. 2.833 1,778.453 ↑ 13.1 3,296 1

Nested Loop Left Join (cost=283,142.41..3,350,584.91 rows=43,059 width=2,186) (actual time=1,544.867..1,778.453 rows=3,296 loops=1)

40. 2.355 1,673.444 ↑ 13.1 3,296 1

Nested Loop Left Join (cost=283,140.73..1,490,981.57 rows=43,059 width=1,782) (actual time=1,544.697..1,673.444 rows=3,296 loops=1)

41. 1.330 1,661.201 ↑ 13.1 3,296 1

Hash Left Join (cost=283,140.30..1,415,772.89 rows=43,059 width=1,726) (actual time=1,544.677..1,661.201 rows=3,296 loops=1)

  • Hash Cond: (os.whom_juristic_status_id = juristic_status.id)
42. 2.920 1,659.857 ↑ 13.1 3,296 1

Hash Left Join (cost=283,139.00..1,415,563.26 rows=43,059 width=1,692) (actual time=1,544.647..1,659.857 rows=3,296 loops=1)

  • Hash Cond: (os.juristic_org_id = jurictic.id)
43. 1.408 1,595.844 ↑ 13.1 3,296 1

Hash Left Join (cost=264,947.18..1,396,964.21 rows=43,059 width=1,651) (actual time=1,482.054..1,595.844 rows=3,296 loops=1)

  • Hash Cond: (os.whom_status_user_id = official_status_usr.id)
44. 4.493 1,594.425 ↑ 13.1 3,296 1

Hash Left Join (cost=264,945.88..1,396,761.33 rows=43,059 width=1,617) (actual time=1,482.025..1,594.425 rows=3,296 loops=1)

  • Hash Cond: (oq.id = os.og_question_id)
45. 0.974 109.648 ↑ 13.2 3,266 1

Nested Loop (cost=106.49..1,130,357.59 rows=43,059 width=1,282) (actual time=0.201..109.648 rows=3,266 loops=1)

46. 3.160 97.714 ↑ 4.3 2,192 1

Nested Loop Left Join (cost=105.93..1,041,539.31 rows=9,339 width=1,021) (actual time=0.186..97.714 rows=2,192 loops=1)

47. 9.066 9.066 ↑ 4.3 2,192 1

Index Scan using doc_n_did_c_n_nbl_del_oid_idx on document_n dn (cost=0.57..32,735.84 rows=9,339 width=53) (actual time=0.022..9.066 rows=2,192 loops=1)

  • Index Cond: ((document_id = ANY ('{379675297,384277147,386678161,393331051,393349920,396463552,396698368,396775068,397018340,397451025,398264763,398725951,400191150,400298834,401144032,401269479,401996302,402074899,403064754,403176248,404773575,404782818,405038085,405099697,405276825,405362756,405507471,405586607,405784717,405805154,405828531,405829079,405852118,406394905,406867116,407272003,407552544,407647443,407755053,407820411,407963660,408060963,408450088,408582982,408609079,408840735,408860456,408975303,409015967,409299428,409557446,409563822,409567836,409571165,409710290,410134833,410176979,410187846,410283518,410343752,410508000,410562473,410587537,410587970,410675388,410790983,410793108,410876989,410943466,411228114,411330643,411511656,411712797,411981716,411985436,412036983,412060421,412093212,412096014,412096040,412237240,412370942,412421670,412422907,412855730,412919492,413008469,413011524,413013158,413131697,413135479,413533271,413579583,413580552,413606507,413737060,413880460,413882788,413987516,414022983,414073743,414100824,414189343,414260330,414285072,414358540,414367694,414413240,414464390,414587889,414620232,414664058,414725703,414902337,414929702,414933433,414960734,414996578,415000785,415102030,415233732,415283917,415320722,415320725,415380099,415380837,415394160,415410031,415416865,415431171,415461116,415478944,415487838,415490020,415565502,415612620,415620784,415627700,415634089,415755448,415786562,415787808,415788509,415824136,415825915,415826803,415839026,415852231,415854554,415858786,415866164,415915159,415924674,415926282,415952082,415980125,416008252,416013177,416041736,416045120,416059387,416060020,416078532,416104169,416116210,416118074,416143541,416168538,416188727,416198871,416201324,416204415,416212060,416244707,416265444,416268462,416284396,416285234,416311315,416317393,416318437,416319950,416321602,416326927,416341001,416343779,416363484,416364185,416372990,416373147,416394118,416419481,416421401,416424129,416434988,416447057,416450038,416456177,416464741,416467996,416468642,416473669,416483619,416486603,416492040,416493504,416505069,416507002,416510370,416511254,416514850,416516271,416536103,416554258,416554507,416557098,416562021,416563317,416603575,416621645,416636692,416640736,416644768,416652375,416660879,416673373,416677297,416682363,416693870,416709469,416712673,416712744,416712815,416724927,416728947,416740783,416752032,416760475,416765565,416783546,416788599,416790343,416816973,416832014,416836560,416837451,416839170,416840662,416841535,416842865,416846300,416849985,416850206,416860038,416860421,416900233,416906428,416909011,416915154,416927507,416929423,416934068,416944056,416951740,416958366,416963096,416964347,416987558,416992679,417001640,417002198,417005889,417012550,417012736,417018103,417022820,417025938,417032261,417032841,417036340,417040128,417041310,417052541,417057270,417063025,417075536,417078217,417080010,417085448,417085454,417086411,417087064,417087824,417090486,417091762,417092251,417092525,417095576,417101770,417102865,417108921,417109899,417110073,417111164,417111536,417112152,417113921,417114619,417116183,417117569,417118256,417123545,417123723,417131009,417138495,417148987,417150684,417151279,417151326,417151574,417152077,417152081,417152261,417153344,417156881,417159862,417161019,417161200,417161920,417162664,417164440,417164502,417164850,417166131,417166494,417166736,417167436,417167821,417168420,417168529,417169759,417171538,417175552,417179058,417179833,417181438,417181577,417182235,417182637,417183425,417183468,417184148,417187126,417187210,417188318,417188996,417189001,417189618,417190081,417190133,417190413,417191128,417193918,417194973,417195168,417195220,417196750,417198556,417199143,417199545,417200328,417201203,417201493,417203393,417208189,417209683,417209847,417212142,417213999,417216653,417216762,417216767,417216774,417219396,417220309,417222616,417222918,417223122,417223756,417224422,417224775,417225165,417225246,417225351,417225453,417225680,417225681,417225787,417225880,417226107,417226149,417226176,417226293,417226351,417227266,417227562,417228035,417228677,417231869,417233501,417233517,417233802,417233833,417233862,417235654,417237261,417238367,417238528,417240049,417241445,417244601,417245110,417245615,417246418,417247063,417247243,417247361,417247652,417247909,417249336,417249829,417249963,417249979,417251139,417253941,417253956,417254800,417254891,417255895,417256628,417257281,417257973,417258248,417258666,417258725,417260291,417262722,417262906,417263019,417265903,417266195,417266305,417266393,417266802,417267344,417268128,417270215,417271078,417271866,417272285,417273382,417274162,417276151,417276300,417277475,417277985,417278793,417278904,417280186,417280804,417281087,417281848,417282300,417282583,417282585,417282675,417282975,417283872,417284318,417284950,417285351,417286562,417288285,417289977,417290559,417292140,417292890,417293512,417294013,417294268,417294393,417294945,417295207,417295213,417295447,417295734,417296065,417296894,417296903,417296973,417297118,417297144,417297343,417297616,417297949,417298075,417298336,417298441,417298451,417298668,417298876,417298911,417298946,417299002,417299065,417299122,417299135,417299144,417299526,417299531,417299591,417299680,417299868,417300304,417300395,417300404,417300451,417300460,417300492,417300571,417300612,417300666,417300867,417300951,417301055,417301075,417301097,417301164,417301228,417301229,417301238,417301270,417301306,417301325,417301332,417301333,417301399,417301437,417301438,417301444,417301463,417301887,417302977,417302991,417304204,417305632,417307091,417308228,417308806,417309166,417309656,417309912,417310562,417310727,417312533,417315140,417317000,417317482,417319050,417320535,417321499,417322735,417324089,417324512,417325120,417326148,417327004,417327605,417328188,417328415,417328921,417329304,417329549,417329626,417329646,417329721,417329997,417330078,417330243,417330658,417330718,417331174,417331255,417331303,417332165,417332257,417332258,417332335,417333299,417336680,417336831,417338369,417338444,417338763,417338818,417339103,417339244,417339433,417340543,417341201,417341347,417342055,417342114,417342393,417343179,417343371,417344661,417344768,417345569,417345702,417347984,417348129,417348268,417348714,417349750,417351373,417351751,417353072,417353245,417356784,417356919,417359890,417360023,417363438,417363577,417364595,417365181,417365673,417365837,417366689,417368313,417369048,417369153,417370638,417371031,417372446,417372533,417372604,417374795,417375789,417376260,417377609,417377737,417377802,417378608,417378990,417379014,417379395,417379454,417379743,417379876,417379949,417380272,417380365,417380606,417380616,417380621,417380622,417380624,417380630,417380660,417380678,417380681,417380682,417380689,417380698,417380722,417380723,417380745,417383766,417384081,417384823,417385008,417385555,417387813,417388244,417388383,417388464,417389097,417390244,417390480,417391723,417392442,417393772,417393977,417395155,417395452,417395667,417395771,417395871,417395965,417396126,417396225,417397152,417397419,417397501,417397568,417399113,417399725,417399837,417400011,417400635,417400939,417401184,417401741,417401873,417402082,417402144,417402912,417403111,417403180,417406808,417407473,417407731,417408103,417408503,417408719,417408875,417408881,417409283,417409326,417410268,417410863,417410925,417411468,417411489,417412388,417412800,417412810,417412820,417413079,417413148,417413170,417413592,417413690,417413918,417413944,417414855,417414946,417415462,417415481,417415645,417416827,417416872,417417130,417417975,417419174,417419997,417421025,417422937,417422942,417425515,417425717,417425856,417426037,417426923,417427343,417427994,417428297,417428732,417428771,417429716,417429971,417430035,417430251,417431561,417432055,417433515,417433753,417434788,417435049,417435579,417436360,417436481,417437021,417439035,417439572,417439574,417440159,417442575,417442926,417443126,417443651,417445427,417445681,417446113,417446373,417449261,417449408,417450189,417451079,417451383,417453617,417453856,417454608,417454773,417455213,417455365,417455664,417455796,417456145,417456147,417456150,417456452,417456570,417456772,417456828,417456938,417456950,417456960,417456962,417456964,417456968,417456970,417456974,417456980,417457059,417457067,417457068,417457092,417457093,417457130,417457370,417457633,417457658,417457815,417457950,417458148,417458721,417458849,417458854,417459297,417459419,417459424,417459977,417460120,417460383,417460512,417460968,417461047,417461365,417461415,417462311,417462453,417463152,417463254,417463428,417463664,417464091,417464292,417466992,417467270,417467360,417467704,417467781,417470270,417470769,417470842,417470863,417471120,417471404,417471614,417471993,417472649,417472880,417472924,417473659,417474001,417474225,417474496,417474647,417475582,417476355,417476575,417476703,417476707,417476880,417477378,417477714,417478135,417478494,417479022,417479134,417479757,417480183,417480257,417480291,417480887,417481689,417482213,417482525,417483036,417483039,417483435,417483544,417483566,417484291,417484780,417484792,417484974,417485621,417485642,417485709,417485944,417486394,417486891,417487014,417487110,417488163,417488231,417488453,417488559,417489267,417489693,417490055,417490135,417490207,417490812,417491190,417492096,417493717,417494057,417494282,417494295,417494620,417494905,417494955,417495509,417495738,417495925,417496808,417497043,417497210,417497227,417497619,417497751,417498071,417498105,417498825,417499025,417499107,417499138,417499344,417499372,417499414,417499693,417499874,417499923,417500876,417501865,417501997,417502321,417502374,417503350,417503579,417504304,417505363,417505394,417505581,417506157,417506411,417506437,417507360,417507629,417508007,417508109,417508356,417508562,417508867,417509937,417509950,417510466,417510551,417510657,417511606,417511924,417511980,417512109,417512116,417513396,417514003,417514216,417514637,417515477,417516025,417516128,417516504,417516533,417516830,417518447}'::bigint[])) AND (category = 2) AND (d_deleted = 0))
  • Filter: (status = 8)
  • Rows Removed by Filter: 2
48. 63.568 85.488 ↑ 1.0 1 2,192

GroupAggregate (cost=105.36..108.00 rows=1 width=968) (actual time=0.039..0.039 rows=1 loops=2,192)

  • Group Key: mr.id
49. 6.576 21.920 ↑ 1.9 9 2,192

Sort (cost=105.36..105.40 rows=17 width=70) (actual time=0.010..0.010 rows=9 loops=2,192)

  • Sort Key: mr.id
  • Sort Method: quicksort Memory: 27kB
50. 3.940 15.344 ↑ 1.9 9 2,192

Nested Loop (cost=0.99..105.01 rows=17 width=70) (actual time=0.005..0.007 rows=9 loops=2,192)

51. 4.384 4.384 ↑ 1.0 1 2,192

Index Scan using document_mosru_did_oid on document_mosru mr (cost=0.43..8.45 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=2,192)

  • Index Cond: (document_id = dn.document_id)
52. 7.020 7.020 ↑ 5.4 17 1,170

Index Scan using dmd_dmid_idx on document_mosru_data md (cost=0.56..95.64 rows=92 width=70) (actual time=0.003..0.006 rows=17 loops=1,170)

  • Index Cond: (document_mosru_id = mr.id)
53. 10.960 10.960 ↑ 5.0 1 2,192

Index Scan using fk_idx_bhpx on og_question oq (cost=0.56..9.46 rows=5 width=261) (actual time=0.004..0.005 rows=1 loops=2,192)

  • Index Cond: (document_id = dn.document_id)
  • Filter: (theme_id IS NOT NULL)
54. 178.896 1,480.284 ↓ 1.0 346,577 1

Hash (cost=260,512.23..260,512.23 rows=346,173 width=343) (actual time=1,480.284..1,480.284 rows=346,577 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 110764kB
55. 70.266 1,301.388 ↓ 1.0 346,577 1

Hash Left Join (cost=222,466.88..260,512.23 rows=346,173 width=343) (actual time=763.294..1,301.388 rows=346,577 loops=1)

  • Hash Cond: (os_recipient.group_id = os_recipient_group.id)
56. 68.877 1,171.533 ↓ 1.0 346,577 1

Hash Left Join (cost=204,275.05..237,560.52 rows=346,173 width=302) (actual time=702.208..1,171.533 rows=346,577 loops=1)

  • Hash Cond: (os.user_id = os_recipient.id)
57. 54.343 789.806 ↓ 1.0 346,577 1

Hash Left Join (cost=111,236.10..141,737.41 rows=346,173 width=280) (actual time=386.831..789.806 rows=346,577 loops=1)

  • Hash Cond: (os.og_official_status_id = official_status.id)
58. 63.930 735.449 ↓ 1.0 346,577 1

Hash Join (cost=111,234.80..139,154.05 rows=346,173 width=246) (actual time=386.792..735.449 rows=346,577 loops=1)

  • Hash Cond: (os.document_type_ref_id = type_ref.id)
59. 71.560 671.507 ↓ 1.0 346,577 1

Hash Join (cost=111,233.62..134,392.99 rows=346,173 width=233) (actual time=386.766..671.507 rows=346,577 loops=1)

  • Hash Cond: (auth.group_id = auth_group.id)
60. 80.899 538.564 ↓ 1.0 346,577 1

Hash Join (cost=93,041.80..111,441.28 rows=346,173 width=192) (actual time=323.866..538.564 rows=346,577 loops=1)

  • Hash Cond: (os.author = auth.id)
61. 98.968 136.391 ↓ 1.0 346,577 1

Hash Join (cost=2.84..13,642.45 rows=346,173 width=170) (actual time=0.064..136.391 rows=346,577 loops=1)

  • Hash Cond: (os.og_measure_id = om.id)
62. 37.388 37.388 ↓ 1.0 346,577 1

Seq Scan on og_sentence os (cost=0.00..8,879.73 rows=346,173 width=108) (actual time=0.008..37.388 rows=346,577 loops=1)

63. 0.005 0.035 ↑ 1.4 11 1

Hash (cost=2.65..2.65 rows=15 width=70) (actual time=0.035..0.035 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
64. 0.016 0.030 ↑ 1.4 11 1

Hash Join (cost=1.34..2.65 rows=15 width=70) (actual time=0.028..0.030 rows=11 loops=1)

  • Hash Cond: (om.pid = om_parent.id)
65. 0.004 0.004 ↑ 1.0 15 1

Seq Scan on og_measure om (cost=0.00..1.15 rows=15 width=43) (actual time=0.004..0.004 rows=15 loops=1)

66. 0.005 0.010 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=35) (actual time=0.009..0.010 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
67. 0.005 0.005 ↑ 1.0 15 1

Seq Scan on og_measure om_parent (cost=0.00..1.15 rows=15 width=35) (actual time=0.003..0.005 rows=15 loops=1)

68. 121.815 321.274 ↓ 1.0 686,548 1

Hash (cost=84,458.98..84,458.98 rows=686,398 width=30) (actual time=321.274..321.274 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 51724kB
69. 199.459 199.459 ↓ 1.0 686,548 1

Seq Scan on usr auth (cost=0.00..84,458.98 rows=686,398 width=30) (actual time=0.005..199.459 rows=686,548 loops=1)

70. 35.797 61.383 ↑ 1.9 206,821 1

Hash (cost=13,337.55..13,337.55 rows=388,342 width=49) (actual time=61.383..61.383 rows=206,821 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 20488kB
71. 25.586 25.586 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group auth_group (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.015..25.586 rows=206,821 loops=1)

  • Heap Fetches: 9249
72. 0.005 0.012 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=21) (actual time=0.012..0.012 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
73. 0.007 0.007 ↑ 1.0 8 1

Seq Scan on og_document_type_ref type_ref (cost=0.00..1.08 rows=8 width=21) (actual time=0.007..0.007 rows=8 loops=1)

74. 0.007 0.014 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=42) (actual time=0.014..0.014 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
75. 0.007 0.007 ↑ 1.0 13 1

Seq Scan on og_official_status official_status (cost=0.00..1.13 rows=13 width=42) (actual time=0.007..0.007 rows=13 loops=1)

76. 119.397 312.850 ↓ 1.0 686,548 1

Hash (cost=84,458.98..84,458.98 rows=686,398 width=30) (actual time=312.850..312.850 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 51724kB
77. 193.453 193.453 ↓ 1.0 686,548 1

Seq Scan on usr os_recipient (cost=0.00..84,458.98 rows=686,398 width=30) (actual time=0.005..193.453 rows=686,548 loops=1)

78. 34.325 59.589 ↑ 1.9 206,821 1

Hash (cost=13,337.55..13,337.55 rows=388,342 width=49) (actual time=59.589..59.589 rows=206,821 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 20488kB
79. 25.264 25.264 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group os_recipient_group (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.025..25.264 rows=206,821 loops=1)

  • Heap Fetches: 9249
80. 0.005 0.011 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=42) (actual time=0.011..0.011 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
81. 0.006 0.006 ↑ 1.0 13 1

Seq Scan on og_official_status official_status_usr (cost=0.00..1.13 rows=13 width=42) (actual time=0.006..0.006 rows=13 loops=1)

82. 35.344 61.093 ↑ 1.9 206,821 1

Hash (cost=13,337.55..13,337.55 rows=388,342 width=49) (actual time=61.093..61.093 rows=206,821 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 20488kB
83. 25.749 25.749 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group jurictic (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.016..25.749 rows=206,821 loops=1)

  • Heap Fetches: 9249
84. 0.008 0.014 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=42) (actual time=0.014..0.014 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
85. 0.006 0.006 ↑ 1.0 13 1

Seq Scan on og_official_status juristic_status (cost=0.00..1.13 rows=13 width=42) (actual time=0.006..0.006 rows=13 loops=1)

86. 9.888 9.888 ↑ 1.0 1 3,296

Index Scan using og_action_og_question_id_idx on og_action og_act (cost=0.44..1.74 rows=1 width=64) (actual time=0.003..0.003 rows=1 loops=3,296)

  • Index Cond: (og_question_id = oq.id)
87. 10.832 102.176 ↑ 1.0 1 3,296

Nested Loop Left Join (cost=1.68..43.18 rows=1 width=415) (actual time=0.030..0.031 rows=1 loops=3,296)

88. 3.296 82.400 ↑ 1.0 1 3,296

Nested Loop Left Join (cost=1.26..33.12 rows=1 width=399) (actual time=0.024..0.025 rows=1 loops=3,296)

89. 1.060 79.104 ↑ 1.0 1 3,296

Nested Loop Left Join (cost=0.98..31.74 rows=1 width=383) (actual time=0.023..0.024 rows=1 loops=3,296)

90. 1.060 75.808 ↑ 1.0 1 3,296

Nested Loop Left Join (cost=0.70..31.08 rows=1 width=367) (actual time=0.022..0.023 rows=1 loops=3,296)

91. 4.356 72.512 ↑ 1.0 1 3,296

Nested Loop (cost=0.57..30.91 rows=1 width=332) (actual time=0.021..0.022 rows=1 loops=3,296)

92. 16.728 65.920 ↑ 1.0 1 3,296

Index Scan using og_question_object_pkey on og_question_object ogobj (cost=0.42..30.74 rows=1 width=307) (actual time=0.020..0.020 rows=1 loops=3,296)

  • Index Cond: (id = oq.og_question_object_id)
93.          

SubPlan (for Index Scan)

94. 0.000 0.000 ↓ 0.0 0 2,236

Index Only Scan using ug_idname_idx on user_group (cost=0.42..4.44 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=2,236)

  • Index Cond: (id = ogobj.group_id)
  • Heap Fetches: 58
95. 2.236 2.236 ↓ 0.0 0 2,236

Index Scan using og_question_object_pkey on og_question_object (cost=0.42..8.44 rows=1 width=28) (actual time=0.001..0.001 rows=0 loops=2,236)

  • Index Cond: (id = ogobj.master_id)
96. 26.832 26.832 ↑ 1.0 1 2,236

Seq Scan on og_country og_country_1 (cost=0.00..4.41 rows=1 width=11) (actual time=0.009..0.012 rows=1 loops=2,236)

  • Filter: (id = ogobj.country_id)
  • Rows Removed by Filter: 192
97. 15.652 15.652 ↑ 1.0 1 2,236

Seq Scan on og_republic og_republic_1 (cost=0.00..3.33 rows=1 width=16) (actual time=0.003..0.007 rows=1 loops=2,236)

  • Filter: (id = ogobj.republic_id)
  • Rows Removed by Filter: 105
98. 4.472 4.472 ↑ 1.0 1 2,236

Index Scan using sys_c0014931 on og_city og_city_1 (cost=0.42..8.44 rows=1 width=13) (actual time=0.002..0.002 rows=1 loops=2,236)

  • Index Cond: (id = ogobj.city_id)
99. 2.236 2.236 ↑ 1.0 1 2,236

Index Scan using og_question_object_category_pkey on og_question_object_category ogobjcat (cost=0.14..0.16 rows=1 width=33) (actual time=0.001..0.001 rows=1 loops=2,236)

  • Index Cond: (id = ogobj.category_id)
100. 2.236 2.236 ↑ 1.0 1 2,236

Index Scan using og_adistrict_pk on og_adistrict obj_adistrict (cost=0.14..0.15 rows=1 width=43) (actual time=0.001..0.001 rows=1 loops=2,236)

  • Index Cond: (id = ogobj.adistrict_id)
101. 2.236 2.236 ↑ 1.0 1 2,236

Index Scan using sys_c0014934 on og_district obj_district (cost=0.28..0.66 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=2,236)

  • Index Cond: (id = ogobj.district_id)
102. 0.000 0.000 ↓ 0.0 0 2,236

Index Scan using sys_c0014943 on og_republic_area obj_republic_area (cost=0.28..1.37 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=2,236)

  • Index Cond: (id = ogobj.republic_area_id)
103. 4.472 4.472 ↑ 1.0 1 2,236

Index Scan using og_house_pk on og_house ogh (cost=0.42..1.69 rows=1 width=21) (actual time=0.002..0.002 rows=1 loops=2,236)

  • Index Cond: (id = ogobj.house_id)
104.          

SubPlan (for Nested Loop Left Join)

105. 4.472 4.472 ↑ 1.0 1 2,236

Index Scan using og_street_pk on og_street (cost=0.29..8.31 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=2,236)

  • Index Cond: (id = ogobj.street_id)
106. 9.888 9.888 ↑ 1.0 1 3,296

Index Scan using document_og_document_id_idx on document_og dog (cost=0.56..8.44 rows=1 width=96) (actual time=0.003..0.003 rows=1 loops=3,296)

  • Index Cond: (document_id = dn.document_id)
107. 9.803 118.656 ↑ 2.0 1 3,296

Nested Loop Left Join (cost=0.98..42.80 rows=2 width=370) (actual time=0.034..0.036 rows=1 loops=3,296)

108. 3.211 105.472 ↑ 2.0 1 3,296

Nested Loop Left Join (cost=0.70..41.36 rows=2 width=359) (actual time=0.030..0.032 rows=1 loops=3,296)

109. 3.211 98.880 ↑ 2.0 1 3,296

Nested Loop (cost=0.57..41.03 rows=2 width=324) (actual time=0.029..0.030 rows=1 loops=3,296)

110. 21.287 92.288 ↑ 2.0 1 3,296

Index Scan using document_og_a_document_id_idx on document_og_a doga (cost=0.44..40.72 rows=2 width=310) (actual time=0.027..0.028 rows=1 loops=3,296)

  • Index Cond: (document_id = dn.document_id)
111.          

SubPlan (for Index Scan)

112. 40.572 40.572 ↑ 1.0 1 3,381

Seq Scan on og_country (cost=0.00..4.41 rows=1 width=11) (actual time=0.009..0.012 rows=1 loops=3,381)

  • Filter: (id = doga.country_id)
  • Rows Removed by Filter: 192
113. 23.667 23.667 ↑ 1.0 1 3,381

Seq Scan on og_republic (cost=0.00..3.33 rows=1 width=16) (actual time=0.003..0.007 rows=1 loops=3,381)

  • Filter: (id = doga.republic_id)
  • Rows Removed by Filter: 105
114. 6.762 6.762 ↑ 1.0 1 3,381

Index Scan using sys_c0014931 on og_city (cost=0.42..8.44 rows=1 width=13) (actual time=0.002..0.002 rows=1 loops=3,381)

  • Index Cond: (id = doga.city_id)
115. 3.381 3.381 ↑ 1.0 1 3,381

Index Scan using sys_c0014930 on og_author_type oat (cost=0.13..0.15 rows=1 width=22) (actual time=0.001..0.001 rows=1 loops=3,381)

  • Index Cond: (id = doga.author_type_id)
116. 3.381 3.381 ↑ 1.0 1 3,381

Index Scan using og_adistrict_pk on og_adistrict oa (cost=0.14..0.15 rows=1 width=43) (actual time=0.001..0.001 rows=1 loops=3,381)

  • Index Cond: (id = doga.adistrict_id)
117. 3.381 3.381 ↑ 1.0 1 3,381

Index Scan using sys_c0014934 on og_district od (cost=0.28..0.66 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=3,381)

  • Index Cond: (id = doga.district_id)
118. 0.290 0.517 ↑ 1.0 1,801 1

Hash (cost=34.01..34.01 rows=1,801 width=24) (actual time=0.517..0.517 rows=1,801 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 120kB
119. 0.227 0.227 ↑ 1.0 1,801 1

Seq Scan on og_republic_area ora (cost=0.00..34.01 rows=1,801 width=24) (actual time=0.009..0.227 rows=1,801 loops=1)

120. 0.000 13.524 ↓ 0.0 0 3,381

Nested Loop (cost=1.28..8.70 rows=1 width=87) (actual time=0.004..0.004 rows=0 loops=3,381)

121. 2.640 13.524 ↓ 0.0 0 3,381

Nested Loop (cost=0.86..7.62 rows=1 width=38) (actual time=0.004..0.004 rows=0 loops=3,381)

  • Join Filter: (dn.org_id = curator.group_id)
  • Rows Removed by Join Filter: 1
122. 6.762 6.762 ↑ 2.0 1 3,381

Index Only Scan using doc_curator_doc_org_user_idx on document_curator dc (cost=0.43..4.16 rows=2 width=16) (actual time=0.002..0.002 rows=1 loops=3,381)

  • Index Cond: (document_id = dn.document_id)
  • Heap Fetches: 386
123. 4.122 4.122 ↑ 1.0 1 2,061

Index Scan using sys_c003322_1 on usr curator (cost=0.42..1.72 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=2,061)

  • Index Cond: (id = dc.user_id)
124. 0.570 0.570 ↑ 1.0 1 285

Index Only Scan using ug_idname_idx on user_group curator_group (cost=0.42..1.06 rows=1 width=49) (actual time=0.002..0.002 rows=1 loops=285)

  • Index Cond: (id = curator.group_id)
  • Heap Fetches: 106
125. 35.960 61.908 ↑ 1.9 206,821 1

Hash (cost=13,337.55..13,337.55 rows=388,342 width=49) (actual time=61.908..61.908 rows=206,821 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 20488kB
126. 25.948 25.948 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group org_r (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.013..25.948 rows=206,821 loops=1)

  • Heap Fetches: 9249
127. 6.784 6.784 ↓ 0.0 0 3,392

Index Scan using doc_in_d_doc_id on document_in_d did (cost=0.56..22.10 rows=5 width=21) (actual time=0.002..0.002 rows=0 loops=3,392)

  • Index Cond: (document_id = dn.document_id)
128. 3.392 16.960 ↓ 0.0 0 3,392

Sort (cost=26.29..26.30 rows=1 width=260) (actual time=0.005..0.005 rows=0 loops=3,392)

  • Sort Key: cl.out_date DESC
  • Sort Method: quicksort Memory: 25kB
129. 3.392 13.568 ↓ 0.0 0 3,392

Nested Loop Left Join (cost=2.12..26.28 rows=1 width=260) (actual time=0.004..0.004 rows=0 loops=3,392)

130. 0.000 10.176 ↓ 0.0 0 3,392

Nested Loop Left Join (cost=1.70..25.81 rows=1 width=223) (actual time=0.003..0.003 rows=0 loops=3,392)

131. 0.000 10.176 ↓ 0.0 0 3,392

Nested Loop Left Join (cost=1.27..17.36 rows=1 width=201) (actual time=0.003..0.003 rows=0 loops=3,392)

132. 2.057 10.176 ↓ 0.0 0 3,392

Nested Loop Left Join (cost=0.85..16.90 rows=1 width=160) (actual time=0.003..0.003 rows=0 loops=3,392)

133. 6.784 6.784 ↓ 0.0 0 3,392

Index Scan using "idx$$_760b000d" on covering_letter cl (cost=0.43..8.45 rows=1 width=138) (actual time=0.002..0.002 rows=0 loops=3,392)

  • Index Cond: (document_id = dn.document_id)
134. 1.335 1.335 ↑ 1.0 1 445

Index Scan using usr_id_name_freq_idx on usr signer (cost=0.42..8.44 rows=1 width=30) (actual time=0.003..0.003 rows=1 loops=445)

  • Index Cond: (cl.sign = id)
135. 0.890 0.890 ↑ 1.0 1 445

Index Only Scan using ug_idname_idx on user_group signer_group (cost=0.42..0.45 rows=1 width=49) (actual time=0.002..0.002 rows=1 loops=445)

  • Index Cond: (id = signer.group_id)
  • Heap Fetches: 10
136. 0.000 0.000 ↓ 0.0 0 445

Index Scan using usr_id_name_freq_idx on usr executor (cost=0.42..8.44 rows=1 width=30) (actual time=0.000..0.000 rows=0 loops=445)

  • Index Cond: (cl.executor = id)
137. 0.000 0.000 ↓ 0.0 0 445

Index Only Scan using ug_idname_idx on user_group executor_group (cost=0.42..0.45 rows=1 width=49) (actual time=0.000..0.000 rows=0 loops=445)

  • Index Cond: (id = executor.group_id)
  • Heap Fetches: 0
138. 10.224 10.224 ↑ 98.0 1 3,408

Index Only Scan using dr_docid_recip_idx on document_r dr (cost=0.57..3.04 rows=98 width=16) (actual time=0.003..0.003 rows=1 loops=3,408)

  • Index Cond: (document_id = oq.document_id)
  • Heap Fetches: 262
139. 38,903.827 89,529.637 ↑ 1.2 93,519,759 1

Hash (cost=8,013,674.16..8,013,674.16 rows=108,496,416 width=249) (actual time=89,529.637..89,529.637 rows=93,519,759 loops=1)

  • Buckets: 2097152 Batches: 64 Memory Usage: 291076kB
140. 50,625.810 50,625.810 ↑ 1.2 93,519,759 1

Seq Scan on document d (cost=0.00..8,013,674.16 rows=108,496,416 width=249) (actual time=0.012..50,625.810 rows=93,519,759 loops=1)

141. 193.831 440.355 ↓ 1.0 686,548 1

Hash (cost=111,802.04..111,802.04 rows=686,398 width=71) (actual time=440.355..440.355 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 83934kB
142. 99.107 246.524 ↓ 1.0 686,548 1

Merge Join (cost=0.88..111,802.04 rows=686,398 width=71) (actual time=0.036..246.524 rows=686,548 loops=1)

  • Merge Cond: (ug4.id = u4.group_id)
143. 24.537 24.537 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group ug4 (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.014..24.537 rows=206,821 loops=1)

  • Heap Fetches: 9249
144. 122.880 122.880 ↓ 1.0 686,548 1

Index Only Scan using "idx$$_727b0001" on usr u4 (cost=0.42..89,164.56 rows=686,398 width=30) (actual time=0.012..122.880 rows=686,548 loops=1)

  • Heap Fetches: 51779
145. 196.755 440.589 ↓ 1.0 686,548 1

Hash (cost=111,802.04..111,802.04 rows=686,398 width=71) (actual time=440.589..440.589 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 83934kB
146. 96.190 243.834 ↓ 1.0 686,548 1

Merge Join (cost=0.88..111,802.04 rows=686,398 width=71) (actual time=0.036..243.834 rows=686,548 loops=1)

  • Merge Cond: (ug3.id = u3.group_id)
147. 24.492 24.492 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group ug3 (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.018..24.492 rows=206,821 loops=1)

  • Heap Fetches: 9249
148. 123.152 123.152 ↓ 1.0 686,548 1

Index Only Scan using "idx$$_727b0001" on usr u3 (cost=0.42..89,164.56 rows=686,398 width=30) (actual time=0.011..123.152 rows=686,548 loops=1)

  • Heap Fetches: 51779
149. 157.237 415.103 ↓ 1.0 686,548 1

Hash (cost=111,802.04..111,802.04 rows=686,398 width=71) (actual time=415.103..415.103 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 83934kB
150. 100.191 257.866 ↓ 1.0 686,548 1

Merge Join (cost=0.88..111,802.04 rows=686,398 width=71) (actual time=0.038..257.866 rows=686,548 loops=1)

  • Merge Cond: (recipient_group.id = recipient.group_id)
151. 26.971 26.971 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group recipient_group (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.021..26.971 rows=206,821 loops=1)

  • Heap Fetches: 9249
152. 130.704 130.704 ↓ 1.0 686,548 1

Index Only Scan using "idx$$_727b0001" on usr recipient (cost=0.42..89,164.56 rows=686,398 width=30) (actual time=0.011..130.704 rows=686,548 loops=1)

  • Heap Fetches: 51778
153. 13.632 13.632 ↑ 1.0 1 3,408

Index Only Scan using da_docid_author_idx on document_a da (cost=0.57..1.26 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=3,408)

  • Index Cond: (document_id = dr.document_id)
  • Heap Fetches: 2895
154. 197.609 443.947 ↓ 1.0 686,548 1

Hash (cost=111,802.04..111,802.04 rows=686,398 width=71) (actual time=443.947..443.947 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 83934kB
155. 98.149 246.338 ↓ 1.0 686,548 1

Merge Join (cost=0.88..111,802.04 rows=686,398 width=71) (actual time=0.035..246.338 rows=686,548 loops=1)

  • Merge Cond: (ug7.id = u7.group_id)
156. 24.156 24.156 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group ug7 (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.019..24.156 rows=206,821 loops=1)

  • Heap Fetches: 9249
157. 124.033 124.033 ↓ 1.0 686,548 1

Index Only Scan using "idx$$_727b0001" on usr u7 (cost=0.42..89,164.56 rows=686,398 width=30) (actual time=0.009..124.033 rows=686,548 loops=1)

  • Heap Fetches: 51779
158. 199.207 445.738 ↓ 1.0 686,548 1

Hash (cost=111,802.04..111,802.04 rows=686,398 width=71) (actual time=445.738..445.738 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 83934kB
159. 97.612 246.531 ↓ 1.0 686,548 1

Merge Join (cost=0.88..111,802.04 rows=686,398 width=71) (actual time=0.037..246.531 rows=686,548 loops=1)

  • Merge Cond: (ug6.id = u6.group_id)
160. 24.780 24.780 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group ug6 (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.019..24.780 rows=206,821 loops=1)

  • Heap Fetches: 9249
161. 124.139 124.139 ↓ 1.0 686,548 1

Index Only Scan using "idx$$_727b0001" on usr u6 (cost=0.42..89,164.56 rows=686,398 width=30) (actual time=0.010..124.139 rows=686,548 loops=1)

  • Heap Fetches: 51779
162. 196.411 440.259 ↓ 1.0 686,548 1

Hash (cost=111,802.04..111,802.04 rows=686,398 width=71) (actual time=440.259..440.259 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 83934kB
163. 97.086 243.848 ↓ 1.0 686,548 1

Merge Join (cost=0.88..111,802.04 rows=686,398 width=71) (actual time=0.035..243.848 rows=686,548 loops=1)

  • Merge Cond: (ug5.id = u5.group_id)
164. 24.242 24.242 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group ug5 (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.018..24.242 rows=206,821 loops=1)

  • Heap Fetches: 9249
165. 122.520 122.520 ↓ 1.0 686,548 1

Index Only Scan using "idx$$_727b0001" on usr u5 (cost=0.42..89,164.56 rows=686,398 width=30) (actual time=0.009..122.520 rows=686,548 loops=1)

  • Heap Fetches: 51779
166. 148.372 383.085 ↓ 1.0 686,548 1

Hash (cost=84,458.98..84,458.98 rows=686,398 width=30) (actual time=383.085..383.085 rows=686,548 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 51724kB
167. 234.713 234.713 ↓ 1.0 686,548 1

Seq Scan on usr author (cost=0.00..84,458.98 rows=686,398 width=30) (actual time=0.011..234.713 rows=686,548 loops=1)

168. 44.886 83.285 ↑ 1.9 206,821 1

Hash (cost=13,337.55..13,337.55 rows=388,342 width=49) (actual time=83.285..83.285 rows=206,821 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 21186kB
169. 38.399 38.399 ↑ 1.9 206,821 1

Index Only Scan using ug_idname_idx on user_group author_group (cost=0.42..13,337.55 rows=388,342 width=49) (actual time=0.024..38.399 rows=206,821 loops=1)

  • Heap Fetches: 9249
170. 34.736 112.157 ↑ 17.8 57,394 1

Sort (cost=2,661,936.84..2,664,492.53 rows=1,022,276 width=37) (actual time=104.193..112.157 rows=57,394 loops=1)

  • Sort Key: dn3.org_id, ogfd.document_id
  • Sort Method: quicksort Memory: 6037kB
171. 0.000 77.421 ↑ 17.7 57,602 1

Nested Loop (cost=0.57..2,559,896.56 rows=1,022,276 width=37) (actual time=0.062..77.421 rows=57,602 loops=1)

172. 1.074 1.074 ↓ 1.0 15,402 1

Seq Scan on og_first_document ogfd (cost=0.00..235.48 rows=15,148 width=16) (actual time=0.012..1.074 rows=15,402 loops=1)

173. 77.010 77.010 ↑ 17.0 4 15,402

Index Scan using document_n_uniq_idx on document_n dn3 (cost=0.57..168.30 rows=68 width=29) (actual time=0.003..0.005 rows=4 loops=15,402)

  • Index Cond: (document_id = ogfd.first_document_id)
174. 3.408 149.952 ↑ 1.0 1 3,408

Limit (cost=722.74..722.74 rows=1 width=87) (actual time=0.044..0.044 rows=1 loops=3,408)

175. 10.224 146.544 ↑ 60.0 1 3,408

Sort (cost=722.74..722.89 rows=60 width=87) (actual time=0.043..0.043 rows=1 loops=3,408)

  • Sort Key: dn4.cdate, dn4.id
  • Sort Method: top-N heapsort Memory: 25kB
176. 0.000 136.320 ↑ 10.0 6 3,408

Nested Loop (cost=1.42..722.44 rows=60 width=87) (actual time=0.011..0.040 rows=6 loops=3,408)

177. 0.000 95.424 ↑ 10.0 6 3,408

Nested Loop (cost=1.00..694.78 rows=60 width=46) (actual time=0.009..0.028 rows=6 loops=3,408)

178. 34.080 34.080 ↑ 10.0 6 3,408

Index Scan using doc_n_did_c_n_nbl_del_oid_idx on document_n dn4 (cost=0.57..187.63 rows=60 width=24) (actual time=0.006..0.010 rows=6 loops=3,408)

  • Index Cond: (document_id = dn.document_id)
  • Filter: (reg_user_id IS NOT NULL)
  • Rows Removed by Filter: 1
179. 62.502 62.502 ↑ 1.0 1 20,834

Index Scan using usr_id_name_freq_idx on usr u2 (cost=0.42..8.44 rows=1 width=30) (actual time=0.002..0.003 rows=1 loops=20,834)

  • Index Cond: (id = dn4.reg_user_id)
180. 41.668 41.668 ↑ 1.0 1 20,834

Index Only Scan using ug_idname_idx on user_group ug2 (cost=0.42..0.45 rows=1 width=49) (actual time=0.002..0.002 rows=1 loops=20,834)

  • Index Cond: (id = u2.group_id)
  • Heap Fetches: 4470
181. 6.816 739.536 ↑ 1.0 1 3,408

Limit (cost=825.43..825.43 rows=1 width=138) (actual time=0.215..0.217 rows=1 loops=3,408)

182. 6.816 732.720 ↑ 5.0 1 3,408

Sort (cost=825.43..825.44 rows=5 width=138) (actual time=0.215..0.215 rows=1 loops=3,408)

  • Sort Key: dn2.rdate
  • Sort Method: quicksort Memory: 25kB
183. 5.708 725.904 ↑ 5.0 1 3,408

Nested Loop (cost=4.67..825.40 rows=5 width=138) (actual time=0.083..0.213 rows=1 loops=3,408)

  • Join Filter: (dr2.document_id = oq2.document_id)
184. 8.700 691.824 ↑ 131.0 2 3,408

Nested Loop (cost=4.11..628.74 rows=262 width=154) (actual time=0.049..0.203 rows=2 loops=3,408)

  • Join Filter: (di.document_id = dr2.document_id)
185. 2.392 630.480 ↑ 9.2 5 3,408

Nested Loop (cost=3.54..477.12 rows=46 width=146) (actual time=0.029..0.185 rows=5 loops=3,408)

186. 0.000 592.992 ↑ 9.2 5 3,408

Nested Loop (cost=3.12..456.40 rows=46 width=105) (actual time=0.027..0.174 rows=5 loops=3,408)

  • Join Filter: (di.document_id = dn2.document_id)
187. 18.062 456.672 ↑ 3.6 10 3,408

Nested Loop (cost=2.55..418.06 rows=36 width=68) (actual time=0.020..0.134 rows=10 loops=3,408)

188. 10.976 368.064 ↑ 3.6 10 3,408

Nested Loop (cost=2.12..401.74 rows=36 width=54) (actual time=0.017..0.108 rows=10 loops=3,408)

189. 23.280 286.272 ↑ 3.6 10 3,408

Nested Loop (cost=1.70..385.43 rows=36 width=40) (actual time=0.014..0.084 rows=10 loops=3,408)

  • Join Filter: (di.document_id = d2.id)
190. 13.596 156.768 ↑ 4.8 10 3,408

Nested Loop (cost=1.13..341.90 rows=48 width=24) (actual time=0.009..0.046 rows=10 loops=3,408)

191. 37.488 37.488 ↑ 4.1 10 3,408

Index Scan using doc_in_d_in_doc_id on document_in_d di (cost=0.56..149.50 rows=41 width=8) (actual time=0.004..0.011 rows=10 loops=3,408)

  • Index Cond: (in_document_id = dn.document_id)
192. 105.684 105.684 ↑ 1.0 1 35,228

Index Only Scan using da_docid_author_idx on document_a da2 (cost=0.57..4.68 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=35,228)

  • Index Cond: (document_id = di.document_id)
  • Heap Fetches: 28633
193. 106.224 106.224 ↑ 1.0 1 35,408

Index Scan using document_pk11118759906747_1_1 on document d2 (cost=0.57..0.89 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=35,408)

  • Index Cond: (id = da2.document_id)
194. 70.816 70.816 ↑ 1.0 1 35,408

Index Only Scan using usr_id_name_freq_idx on usr prepared_by (cost=0.42..0.44 rows=1 width=22) (actual time=0.002..0.002 rows=1 loops=35,408)

  • Index Cond: (id = d2.prepared_by)
  • Heap Fetches: 22989
195. 70.546 70.546 ↑ 1.0 1 35,273

Index Only Scan using usr_id_name_freq_idx on usr answer_author (cost=0.42..0.44 rows=1 width=22) (actual time=0.002..0.002 rows=1 loops=35,273)

  • Index Cond: (id = da2.author)
  • Heap Fetches: 40326
196. 141.092 141.092 ↓ 0.0 0 35,273

Index Scan using doc_n_did_c_n_nbl_del_oid_idx on document_n dn2 (cost=0.57..0.98 rows=7 width=37) (actual time=0.003..0.004 rows=0 loops=35,273)

  • Index Cond: ((document_id = d2.id) AND (category = 3) AND (d_deleted = 0))
  • Filter: (status = 8)
  • Rows Removed by Filter: 0
197. 35.096 35.096 ↑ 1.0 1 17,548

Index Only Scan using ug_idname_idx on user_group answer_ug (cost=0.42..0.44 rows=1 width=49) (actual time=0.002..0.002 rows=1 loops=17,548)

  • Index Cond: (id = dn2.org_id)
  • Heap Fetches: 4920
198. 52.644 52.644 ↓ 0.0 0 17,548

Index Only Scan using dr_docid_recip_idx on document_r dr2 (cost=0.57..3.16 rows=11 width=8) (actual time=0.003..0.003 rows=0 loops=17,548)

  • Index Cond: (document_id = d2.id)
  • Filter: (recipient = ANY ('{77585299,78200303,78190271,78187120,78187124,78535449,19573}'::bigint[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 4095
199. 28.372 28.372 ↑ 1.0 1 7,093

Index Scan using fk_idx_bhpx on og_question oq2 (cost=0.56..0.74 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=7,093)

  • Index Cond: (document_id = d2.id)
  • Filter: (n = oq.n)
  • Rows Removed by Filter: 1
200. 0.000 27.264 ↑ 1.0 1 3,408

Limit (cost=188.07..188.08 rows=1 width=33) (actual time=0.008..0.008 rows=1 loops=3,408)

201. 6.816 27.264 ↑ 36.0 1 3,408

Sort (cost=188.07..188.16 rows=36 width=33) (actual time=0.008..0.008 rows=1 loops=3,408)

  • Sort Key: dn2_1.rdate
  • Sort Method: quicksort Memory: 25kB
202. 20.448 20.448 ↑ 36.0 1 3,408

Index Scan using doc_n_did_c_n_nbl_del_oid_idx on document_n dn2_1 (cost=0.57..187.89 rows=36 width=33) (actual time=0.006..0.006 rows=1 loops=3,408)

  • Index Cond: (document_id = dn.document_id)
  • Filter: (type = 1)
  • Rows Removed by Filter: 6
203. 1,671.014 26,377.605 ↓ 1.0 26,695,696 1

Materialize (cost=4,302,162.75..4,435,541.73 rows=26,675,796 width=24) (actual time=20,609.788..26,377.605 rows=26,695,696 loops=1)

204. 22,146.518 24,706.591 ↓ 1.0 26,695,674 1

Sort (cost=4,302,162.75..4,368,852.24 rows=26,675,796 width=24) (actual time=20,609.785..24,706.591 rows=26,695,674 loops=1)

  • Sort Key: special_kinds.org_id, special_kinds.document_id
  • Sort Method: external merge Disk: 887208kB
205. 2,560.073 2,560.073 ↓ 1.0 26,695,797 1

Seq Scan on document_special_kinds special_kinds (cost=0.00..464,768.96 rows=26,675,796 width=24) (actual time=0.007..2,560.073 rows=26,695,797 loops=1)

206.          

SubPlan (for Merge Left Join)

207. 10.224 10.224 ↑ 1.0 1 3,408

Seq Scan on og_social_group sg (cost=0.00..1.30 rows=1 width=14) (actual time=0.001..0.003 rows=1 loops=3,408)

  • Filter: (id = doga.social_group_ref_id)
  • Rows Removed by Filter: 23
208. 10.224 10.224 ↑ 1.0 1 3,408

Seq Scan on og_privileged op (cost=0.00..1.43 rows=1 width=24) (actual time=0.001..0.003 rows=1 loops=3,408)

  • Filter: (id = doga.privileged_ref_id)
  • Rows Removed by Filter: 33
209. 6.816 6.816 ↑ 1.0 1 3,408

Index Scan using document_kind_list_pkey on document_kind_list (cost=0.28..8.29 rows=1 width=28) (actual time=0.002..0.002 rows=1 loops=3,408)

  • Index Cond: (d.document_kind = id)
210. 37.488 37.488 ↓ 0.0 0 3,408

Seq Scan on document_special_kind sk (cost=0.00..4.99 rows=1 width=28) (actual time=0.011..0.011 rows=0 loops=3,408)

  • Filter: (special_kinds.document_special_kind = id)
  • Rows Removed by Filter: 159
211. 3.408 3.408 ↑ 1.0 1 3,408

Seq Scan on og_kind_ref (cost=0.00..1.10 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=3,408)

  • Filter: (id = oq.kind_ref_id)
  • Rows Removed by Filter: 7
212. 6.816 6.816 ↓ 0.0 0 3,408

Seq Scan on og_cause_of_discontent_ref (cost=0.00..1.19 rows=1 width=62) (actual time=0.001..0.002 rows=0 loops=3,408)

  • Filter: (id = oq.og_cause_of_discontent_ref_id)
  • Rows Removed by Filter: 15
213. 10.224 10.224 ↑ 1.0 1 3,408

Seq Scan on og_type_kind_ref (cost=0.00..2.44 rows=1 width=60) (actual time=0.002..0.003 rows=1 loops=3,408)

  • Filter: (id = oq.type_kind_ref_id)
  • Rows Removed by Filter: 34
214. 3.408 3.408 ↑ 1.0 1 3,408

Seq Scan on og_object_ref (cost=0.00..1.05 rows=1 width=26) (actual time=0.001..0.001 rows=1 loops=3,408)

  • Filter: (id = oq.og_object_ref_id)
  • Rows Removed by Filter: 3
215. 3.332 3.332 ↑ 1.0 1 3,332

Seq Scan on og_validity_ref (cost=0.00..1.05 rows=1 width=13) (actual time=0.001..0.001 rows=1 loops=3,332)

  • Filter: (id = oq.validity_ref_id)
  • Rows Removed by Filter: 3
216. 6.816 6.816 ↑ 1.0 1 3,408

Seq Scan on og_result_ref (cost=0.00..1.18 rows=1 width=22) (actual time=0.001..0.002 rows=1 loops=3,408)

  • Filter: (id = oq.result_ref_id)
  • Rows Removed by Filter: 13
217. 0.052 0.052 ↑ 1.0 1 26

Seq Scan on og_reason_ref (cost=0.00..1.07 rows=1 width=111) (actual time=0.001..0.002 rows=1 loops=26)

  • Filter: (id = oq.reason_ref_id)
  • Rows Removed by Filter: 5
218. 3.408 3.408 ↑ 1.0 1 3,408

Seq Scan on og_execution (cost=0.00..1.09 rows=1 width=11) (actual time=0.001..0.001 rows=1 loops=3,408)

  • Filter: (id = oq.execution)
  • Rows Removed by Filter: 6
219. 3.408 3.408 ↓ 0.0 0 3,408

Seq Scan on og_result (cost=0.00..1.10 rows=1 width=15) (actual time=0.001..0.001 rows=0 loops=3,408)

  • Filter: (id = dog.result)
  • Rows Removed by Filter: 8
Planning time : 115.288 ms
Execution time : 146,855.617 ms