explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Y4AA

Settings
# exclusive inclusive rows x rows loops node
1. 25,021.288 37,202.313 ↑ 396.4 351,727 1

Hash Left Join (cost=9,159,653.83..38,014,332.60 rows=139,431,200 width=1,419) (actual time=3,846.722..37,202.313 rows=351,727 loops=1)

  • Hash Cond: (prog."sourceId" = s.id)
2. 278.326 12,180.970 ↑ 396.4 351,727 1

Hash Left Join (cost=9,159,648.34..14,967,247.61 rows=139,431,200 width=1,446) (actual time=3,846.589..12,180.970 rows=351,727 loops=1)

  • Hash Cond: (cprog."sourceId" = cs.id)
3. 333.209 11,768.615 ↑ 396.4 351,727 1

Hash Left Join (cost=9,159,642.86..14,577,732.62 rows=139,431,200 width=1,449) (actual time=3,712.549..11,768.615 rows=351,727 loops=1)

  • Hash Cond: (ctpp."programId" = cprog.id)
4. 664.208 11,435.069 ↑ 396.4 351,727 1

Merge Join (cost=9,159,618.48..14,207,981.50 rows=139,431,200 width=1,344) (actual time=3,712.191..11,435.069 rows=351,727 loops=1)

  • Merge Cond: (cp."communicationId" = c.id)
5. 0.000 3,991.260 ↓ 1.0 351,727 1

Gather Merge (cost=1,001.69..361,077.34 rows=348,578 width=581) (actual time=36.069..3,991.260 rows=351,727 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 521.840 9,239.184 ↑ 1.2 117,242 3

Nested Loop Left Join (cost=1.67..319,842.76 rows=145,241 width=581) (actual time=5.125..3,079.728 rows=117,242 loops=3)

7. 419.171 8,365.617 ↑ 1.2 117,242 3

Nested Loop Left Join (cost=1.40..188,562.97 rows=145,241 width=476) (actual time=4.085..2,788.539 rows=117,242 loops=3)

8. 250.683 7,594.719 ↑ 1.2 117,242 3

Nested Loop Left Join (cost=1.12..146,632.12 rows=145,241 width=476) (actual time=2.970..2,531.573 rows=117,242 loops=3)

9. 550.498 6,298.302 ↑ 1.2 116,193 3

Nested Loop Left Join (cost=0.84..98,334.58 rows=145,241 width=468) (actual time=1.806..2,099.434 rows=116,193 loops=3)

10. 356.020 5,399.226 ↑ 1.2 116,193 3

Nested Loop (cost=0.71..76,749.82 rows=145,241 width=458) (actual time=1.652..1,799.742 rows=116,193 loops=3)

11. 511.692 511.692 ↑ 1.2 116,193 3

Parallel Index Scan using communication_parties_communicationid_idx on communication_parties cp (cost=0.42..21,606.80 rows=145,241 width=32) (actual time=0.436..170.564 rows=116,193 loops=3)

12. 4,531.514 4,531.514 ↑ 1.0 1 348,578

Index Scan using "Party_pkey" on "Party" p (cost=0.29..0.38 rows=1 width=442) (actual time=0.013..0.013 rows=1 loops=348,578)

  • Index Cond: (id = cp."partyId")
13. 348.578 348.578 ↑ 1.0 1 348,578

Index Scan using "Property_pkey" on "Property" prop (cost=0.13..0.15 rows=1 width=42) (actual time=0.001..0.001 rows=1 loops=348,578)

  • Index Cond: (id = p."assignedPropertyId")
14. 1,045.734 1,045.734 ↓ 0.0 0 348,578

Index Scan using "Lease_partyId_idx" on "Lease" lease (cost=0.28..0.32 rows=1 width=24) (actual time=0.002..0.003 rows=0 loops=348,578)

  • Index Cond: (p.id = "partyId")
  • Filter: ((status)::text = 'executed'::text)
  • Rows Removed by Filter: 0
15. 351.727 351.727 ↑ 1.0 1 351,727

Index Scan using "TeamPropertyProgram_pkey" on "TeamPropertyProgram" tpp (cost=0.27..0.29 rows=1 width=32) (actual time=0.001..0.001 rows=1 loops=351,727)

  • Index Cond: (id = p."teamPropertyProgramId")
16. 351.727 351.727 ↑ 1.0 1 351,727

Index Scan using "Programs_pkey" on "Programs" prog (cost=0.27..0.91 rows=1 width=137) (actual time=0.001..0.001 rows=1 loops=351,727)

  • Index Cond: (id = tpp."programId")
17. 444.024 6,779.601 ↑ 394.9 352,187 1

Materialize (cost=9,143,745.44..12,117,148.06 rows=139,084,800 width=795) (actual time=3,676.114..6,779.601 rows=352,187 loops=1)

18. 401.676 6,335.577 ↑ 400.0 347,712 1

Merge Left Join (cost=9,143,745.44..11,769,436.06 rows=139,084,800 width=795) (actual time=3,676.105..6,335.577 rows=347,712 loops=1)

  • Merge Cond: (c.id = "Communication_1".id)
19. 387.606 3,794.805 ↑ 4.0 347,712 1

Merge Left Join (cost=1,020,307.28..1,121,608.78 rows=1,390,848 width=763) (actual time=2,098.432..3,794.805 rows=347,712 loops=1)

  • Merge Cond: (c.id = "Communication".id)
20. 0.000 2,097.391 ↑ 1.0 347,712 1

Gather Merge (cost=147,823.71..189,144.89 rows=347,712 width=715) (actual time=1,228.873..2,097.391 rows=347,712 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
21. 410.712 4,531.869 ↑ 1.2 115,904 3

Merge Left Join (cost=146,823.69..148,010.27 rows=144,880 width=715) (actual time=1,187.531..1,510.623 rows=115,904 loops=3)

  • Merge Cond: (c.id = cqs."communicationId")
22. 1,571.466 3,639.153 ↑ 1.2 115,904 3

Sort (cost=140,439.20..140,801.40 rows=144,880 width=633) (actual time=1,075.147..1,213.051 rows=115,904 loops=3)

  • Sort Key: c.id
  • Sort Method: external merge Disk: 84416kB
23. 363.849 2,067.687 ↑ 1.2 115,904 3

Hash Left Join (cost=62.04..45,811.73 rows=144,880 width=633) (actual time=2.411..689.229 rows=115,904 loops=3)

  • Hash Cond: (ctpp."propertyId" = commprop.id)
24. 302.637 1,703.787 ↑ 1.2 115,904 3

Hash Left Join (cost=60.91..45,417.89 rows=144,880 width=643) (actual time=2.386..567.929 rows=115,904 loops=3)

  • Hash Cond: (c."teamPropertyProgramId" = ctpp.id)
25. 304.827 1,400.253 ↑ 1.2 115,904 3

Hash Left Join (cost=47.98..45,020.58 rows=144,880 width=627) (actual time=2.073..466.751 rows=115,904 loops=3)

  • Hash Cond: (c."userId" = u.id)
26. 1,089.384 1,089.384 ↑ 1.2 115,904 3

Parallel Seq Scan on "Communication" c (cost=0.00..44,579.80 rows=144,880 width=629) (actual time=0.016..363.128 rows=115,904 loops=3)

27. 0.129 6.042 ↑ 1.0 88 3

Hash (cost=46.88..46.88 rows=88 width=30) (actual time=2.013..2.014 rows=88 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
28. 5.913 5.913 ↑ 1.0 88 3

Seq Scan on "Users" u (cost=0.00..46.88 rows=88 width=30) (actual time=0.349..1.971 rows=88 loops=3)

29. 0.444 0.897 ↓ 3.1 409 3

Hash (cost=11.30..11.30 rows=130 width=48) (actual time=0.299..0.299 rows=409 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 40kB
30. 0.453 0.453 ↓ 3.1 409 3

Seq Scan on "TeamPropertyProgram" ctpp (cost=0.00..11.30 rows=130 width=48) (actual time=0.006..0.151 rows=409 loops=3)

31. 0.018 0.051 ↑ 1.0 6 3

Hash (cost=1.06..1.06 rows=6 width=22) (actual time=0.017..0.017 rows=6 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.033 0.033 ↑ 1.0 6 3

Seq Scan on "Property" commprop (cost=0.00..1.06 rows=6 width=22) (actual time=0.009..0.011 rows=6 loops=3)

33. 68.733 482.004 ↑ 1.0 39,369 3

Materialize (cost=6,383.49..6,582.00 rows=39,701 width=98) (actual time=112.371..160.668 rows=39,369 loops=3)

34. 226.848 413.271 ↑ 1.0 39,369 3

Sort (cost=6,383.49..6,482.74 rows=39,701 width=98) (actual time=112.364..137.757 rows=39,369 loops=3)

  • Sort Key: cqs."communicationId
  • Sort Method: external merge Disk: 3688kB
35. 104.430 186.423 ↑ 1.0 39,369 3

Hash Left Join (cost=47.98..1,177.45 rows=39,701 width=98) (actual time=0.375..62.141 rows=39,369 loops=3)

  • Hash Cond: (cqs."userId" = cqsu.id)
36. 81.654 81.654 ↑ 1.0 39,369 3

Seq Scan on "CallQueueStatistics" cqs (cost=0.00..1,022.01 rows=39,701 width=100) (actual time=0.249..27.218 rows=39,369 loops=3)

37. 0.114 0.339 ↑ 1.0 88 3

Hash (cost=46.88..46.88 rows=88 width=30) (actual time=0.113..0.113 rows=88 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
38. 0.225 0.225 ↑ 1.0 88 3

Seq Scan on "Users" cqsu (cost=0.00..46.88 rows=88 width=30) (actual time=0.004..0.075 rows=88 loops=3)

39. 299.367 1,309.808 ↑ 5.6 249,762 1

GroupAggregate (cost=872,483.57..900,300.53 rows=1,390,848 width=48) (actual time=869.553..1,309.808 rows=249,762 loops=1)

  • Group Key: "Communication".id
40. 333.314 1,010.441 ↑ 5.5 251,609 1

Sort (cost=872,483.57..875,960.69 rows=1,390,848 width=32) (actual time=869.539..1,010.441 rows=251,609 loops=1)

  • Sort Key: "Communication".id
  • Sort Method: external merge Disk: 9168kB
41. 136.170 677.127 ↑ 5.5 251,609 1

Hash Join (cost=16.18..664,008.69 rows=1,390,848 width=32) (actual time=2.445..677.127 rows=251,609 loops=1)

  • Hash Cond: ((unnest("Communication".teams)) = t1.id)
42. 257.686 538.549 ↑ 138.2 251,609 1

ProjectSet (cost=0.00..223,071.96 rows=34,771,200 width=32) (actual time=0.028..538.549 rows=251,609 loops=1)

43. 280.863 280.863 ↑ 1.0 347,712 1

Seq Scan on "Communication" (cost=0.00..46,608.12 rows=347,712 width=46) (actual time=0.021..280.863 rows=347,712 loops=1)

44. 0.012 2.408 ↑ 1.0 8 1

Hash (cost=16.08..16.08 rows=8 width=32) (actual time=2.407..2.408 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
45. 2.396 2.396 ↑ 1.0 8 1

Seq Scan on "Teams" t1 (cost=0.00..16.08 rows=8 width=32) (actual time=1.156..2.396 rows=8 loops=1)

46. 370.186 2,139.096 ↑ 100.1 347,367 1

GroupAggregate (cost=8,123,438.16..8,818,862.16 rows=34,771,200 width=48) (actual time=1,577.666..2,139.096 rows=347,367 loops=1)

  • Group Key: "Communication_1".id
47. 491.429 1,768.910 ↑ 93.3 372,526 1

Sort (cost=8,123,438.16..8,210,366.16 rows=34,771,200 width=27) (actual time=1,577.648..1,768.910 rows=372,526 loops=1)

  • Sort Key: "Communication_1".id
  • Sort Method: external merge Disk: 14608kB
48. 248.697 1,277.481 ↑ 93.3 372,526 1

Hash Join (cost=1,754.55..1,272,316.78 rows=34,771,200 width=27) (actual time=128.822..1,277.481 rows=372,526 loops=1)

  • Hash Cond: ((((unnest("Communication_1".persons)))::uuid) = p1.id)
49. 332.230 900.095 ↑ 93.3 372,526 1

Result (cost=0.00..831,567.96 rows=34,771,200 width=32) (actual time=0.041..900.095 rows=372,526 loops=1)

50. 306.734 567.865 ↑ 93.3 372,526 1

ProjectSet (cost=0.00..223,071.96 rows=34,771,200 width=48) (actual time=0.037..567.865 rows=372,526 loops=1)

51. 261.131 261.131 ↑ 1.0 347,712 1

Seq Scan on "Communication" "Communication_1" (cost=0.00..46,608.12 rows=347,712 width=79) (actual time=0.031..261.131 rows=347,712 loops=1)

52. 18.667 128.689 ↓ 1.0 49,213 1

Hash (cost=1,140.91..1,140.91 rows=49,091 width=27) (actual time=128.689..128.689 rows=49,213 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3385kB
53. 110.022 110.022 ↓ 1.0 49,213 1

Seq Scan on "Person" p1 (cost=0.00..1,140.91 rows=49,091 width=27) (actual time=72.927..110.022 rows=49,213 loops=1)

54. 0.136 0.337 ↑ 1.2 361 1

Hash (cost=19.17..19.17 rows=417 width=137) (actual time=0.337..0.337 rows=361 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
55. 0.201 0.201 ↑ 1.2 361 1

Seq Scan on "Programs" cprog (cost=0.00..19.17 rows=417 width=137) (actual time=0.015..0.201 rows=361 loops=1)

56. 0.048 134.029 ↑ 1.0 66 1

Hash (cost=4.66..4.66 rows=66 width=29) (actual time=134.029..134.029 rows=66 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
57. 133.981 133.981 ↑ 1.0 66 1

Seq Scan on "Sources" cs (cost=0.00..4.66 rows=66 width=29) (actual time=128.964..133.981 rows=66 loops=1)

58. 0.024 0.055 ↑ 1.0 66 1

Hash (cost=4.66..4.66 rows=66 width=29) (actual time=0.055..0.055 rows=66 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
59. 0.031 0.031 ↑ 1.0 66 1

Seq Scan on "Sources" s (cost=0.00..4.66 rows=66 width=29) (actual time=0.009..0.031 rows=66 loops=1)