explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rg5L

Settings
# exclusive inclusive rows x rows loops node
1. 1,445.530 27,963.420 ↑ 1.0 1 1

Aggregate (cost=7,962,478,792.88..7,962,478,792.89 rows=1 width=8) (actual time=27,963.420..27,963.420 rows=1 loops=1)

2. 11,866.048 26,517.890 ↓ 1.2 4,968,241 1

Nested Loop Left Join (cost=37,253.60..7,962,468,602.45 rows=4,076,174 width=8) (actual time=489.370..26,517.890 rows=4,968,241 loops=1)

3. 703.977 2,134.407 ↓ 1.2 2,503,487 1

Hash Right Join (cost=33,349.08..137,382.38 rows=2,038,087 width=24) (actual time=489.315..2,134.407 rows=2,503,487 loops=1)

  • Hash Cond: (podmienkyp7_.zonfpverzia_id = zonfpverzi1_.id)
4. 464.300 941.382 ↓ 1.0 1,768,194 1

Merge Left Join (cost=2.81..77,132.71 rows=1,739,340 width=16) (actual time=0.061..941.382 rows=1,768,194 loops=1)

  • Merge Cond: (podmienkyp7_.id = dokumenty8_.podmienkapomocidokumentzonfp_id)
5. 208.079 208.079 ↑ 1.0 756,771 1

Index Scan using d_podmienkapomocidokument_pkey on d_podmienkapomocidokumentzonfp podmienkyp7_ (cost=0.42..20,038.50 rows=756,771 width=16) (actual time=0.011..208.079 rows=756,771 loops=1)

6. 269.003 269.003 ↑ 1.0 1,739,340 1

Index Only Scan using podmienkapomocidokumentzonfp_to_dokument__dokument_id_idx on podmienkapomocidokumentzonfp_to_dokument dokumenty8_ (cost=0.43..33,460.53 rows=1,739,340 width=16) (actual time=0.047..269.003 rows=1,739,340 loops=1)

  • Heap Fetches: 0
7. 7.650 489.048 ↓ 1.1 50,329 1

Hash (cost=32,776.29..32,776.29 rows=45,599 width=24) (actual time=489.048..489.048 rows=50,329 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3265kB
8. 15.981 481.398 ↓ 1.1 50,329 1

Hash Right Join (cost=30,414.32..32,776.29 rows=45,599 width=24) (actual time=457.558..481.398 rows=50,329 loops=1)

  • Hash Cond: (dokumenty5_.zonfpverzia_id = zonfpverzi1_.id)
9. 7.973 7.973 ↑ 1.0 99,489 1

Seq Scan on zonfpverzia_to_dokument dokumenty5_ (cost=0.00..1,532.89 rows=99,489 width=16) (actual time=0.013..7.973 rows=99,489 loops=1)

10. 3.392 457.444 ↓ 1.0 17,856 1

Hash (cost=30,191.37..30,191.37 rows=17,836 width=16) (actual time=457.444..457.444 rows=17,856 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1093kB
11. 9.588 454.052 ↓ 1.0 17,856 1

Hash Right Join (cost=29,242.79..30,191.37 rows=17,836 width=16) (actual time=440.786..454.052 rows=17,856 loops=1)

  • Hash Cond: (specificke2_.zonfpverzia_id = zonfpverzi1_.id)
12. 3.796 3.796 ↑ 1.0 40,162 1

Seq Scan on zonfpverzia_to_specifickyciel specificke2_ (cost=0.00..619.62 rows=40,162 width=16) (actual time=0.021..3.796 rows=40,162 loops=1)

13. 3.441 440.668 ↑ 1.0 17,282 1

Hash (cost=29,026.76..29,026.76 rows=17,282 width=16) (actual time=440.668..440.668 rows=17,282 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1067kB
14. 6.557 437.227 ↑ 1.0 17,282 1

Hash Join (cost=28,592.55..29,026.76 rows=17,282 width=16) (actual time=421.590..437.227 rows=17,282 loops=1)

  • Hash Cond: (zonfpverzia.id = zonfpverzi1_.id)
15. 28.832 422.496 ↑ 1.0 17,282 1

Finalize HashAggregate (cost=27,402.20..27,618.22 rows=17,282 width=632) (actual time=413.220..422.496 rows=17,282 loops=1)

  • Group Key: zonfp.id, subjektverzia.nazovuplny, subjektverzia.ico, stav.nazov, workflowst7_.vratenespat, workflowst8_.priznak, projektverzia.nazov, (concat(oif.kod, ' - ', oif.nazov)), faza.cislo, workflowpr9_.nazov, zonfpverzia.id, projekt.id, odoslanie.sposobodoslania
16. 71.411 393.664 ↓ 1.2 17,282 1

Gather (cost=25,403.92..26,934.13 rows=14,402 width=320) (actual time=385.723..393.664 rows=17,282 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
17. 14.329 322.253 ↑ 1.2 5,761 3 / 3

Partial HashAggregate (cost=24,403.92..24,493.93 rows=7,201 width=320) (actual time=319.334..322.253 rows=5,761 loops=3)

  • Group Key: zonfp.id, subjektverzia.nazovuplny, subjektverzia.ico, stav.nazov, workflowst7_.vratenespat, workflowst8_.priznak, projektverzia.nazov, concat(oif.kod, ' - ', oif.nazov), faza.cislo, workflowpr9_.nazov, zonfpverzia.id, projekt.id, odoslanie.sposobodoslania
18. 9.725 307.924 ↑ 1.2 5,761 3 / 3

Nested Loop Left Join (cost=4,879.19..24,169.89 rows=7,201 width=320) (actual time=54.748..307.924 rows=5,761 loops=3)

19. 11.664 257.874 ↑ 1.2 5,761 3 / 3

Nested Loop Left Join (cost=4,878.77..20,489.64 rows=7,201 width=324) (actual time=54.680..257.874 rows=5,761 loops=3)

20. 2.447 182.843 ↑ 1.2 5,761 3 / 3

Hash Left Join (cost=4,878.48..16,723.89 rows=7,201 width=324) (actual time=54.591..182.843 rows=5,761 loops=3)

  • Hash Cond: (workflowst7_.workflowprechod_id = workflowpr9_.id)
21. 3.144 179.648 ↑ 1.2 5,761 3 / 3

Hash Left Join (cost=4,828.06..16,654.56 rows=7,201 width=278) (actual time=53.831..179.648 rows=5,761 loops=3)

  • Hash Cond: (stav.faza_id = faza.id)
22. 3.325 176.353 ↑ 1.2 5,761 3 / 3

Hash Left Join (cost=4,817.90..16,625.16 rows=7,201 width=282) (actual time=53.667..176.353 rows=5,761 loops=3)

  • Hash Cond: (workflowst8_.stav_id = stav.id)
23. 3.695 172.876 ↑ 1.2 5,761 3 / 3

Hash Left Join (cost=4,804.06..16,592.15 rows=7,201 width=262) (actual time=53.488..172.876 rows=5,761 loops=3)

  • Hash Cond: (workflowst7_.workflowstav_id = workflowst8_.id)
24. 4.446 168.977 ↑ 1.2 5,761 3 / 3

Nested Loop Left Join (cost=4,785.43..16,554.46 rows=7,201 width=256) (actual time=53.274..168.977 rows=5,761 loops=3)

25. 4.644 124.206 ↑ 1.2 5,761 3 / 3

Parallel Hash Left Join (cost=4,785.01..12,206.82 rows=7,201 width=247) (actual time=53.201..124.206 rows=5,761 loops=3)

  • Hash Cond: (projekt.aktualnaverzia_id = projektverzia.id)
26. 3.539 112.913 ↑ 1.2 5,761 3 / 3

Hash Left Join (cost=3,006.73..10,409.63 rows=7,201 width=188) (actual time=46.456..112.913 rows=5,761 loops=3)

  • Hash Cond: (zonfp.projekt_id = projekt.id)
27. 3.156 106.364 ↑ 1.2 5,761 3 / 3

Hash Join (cost=2,679.31..10,063.30 rows=7,201 width=180) (actual time=43.380..106.364 rows=5,761 loops=3)

  • Hash Cond: (vyzvaverzia.vyhlasovatel_id = oif.id)
28. 3.613 103.009 ↑ 1.2 5,761 3 / 3

Hash Join (cost=2,670.56..10,035.27 rows=7,201 width=151) (actual time=43.166..103.009 rows=5,761 loops=3)

  • Hash Cond: (zonfpverzia.vyzvaverzia_id = vyzvaverzia.id)
29. 4.715 96.611 ↑ 1.2 5,761 3 / 3

Hash Join (cost=2,424.95..9,770.71 rows=7,201 width=151) (actual time=40.368..96.611 rows=5,761 loops=3)

  • Hash Cond: (subjekt.subjektverziaaktualna_id = subjektverzia.id)
30. 4.338 70.196 ↑ 1.2 5,761 3 / 3

Hash Join (cost=1,242.31..8,569.18 rows=7,201 width=124) (actual time=18.555..70.196 rows=5,761 loops=3)

  • Hash Cond: (zonfpverzia.ziadatel_id = subjekt.id)
31. 9.642 58.235 ↑ 1.2 5,761 3 / 3

Hash Join (cost=726.85..8,034.81 rows=7,201 width=124) (actual time=10.844..58.235 rows=5,761 loops=3)

  • Hash Cond: (zonfpverzia.id = zonfp.verziazonfpaktualna_id)
32. 38.006 38.006 ↑ 1.2 12,972 3 / 3

Parallel Seq Scan on d_zonfpverzia zonfpverzia (cost=0.00..7,175.15 rows=16,215 width=116) (actual time=0.084..38.006 rows=12,972 loops=3)

33. 4.299 10.587 ↑ 1.0 17,282 3 / 3

Hash (cost=510.82..510.82 rows=17,282 width=40) (actual time=10.587..10.587 rows=17,282 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 1276kB
34. 6.288 6.288 ↑ 1.0 17,282 3 / 3

Seq Scan on d_zonfp zonfp (cost=0.00..510.82 rows=17,282 width=40) (actual time=0.045..6.288 rows=17,282 loops=3)

35. 3.105 7.623 ↑ 1.0 14,643 3 / 3

Hash (cost=332.43..332.43 rows=14,643 width=16) (actual time=7.623..7.623 rows=14,643 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 815kB
36. 4.518 4.518 ↑ 1.0 14,643 3 / 3

Seq Scan on d_subjekt subjekt (cost=0.00..332.43 rows=14,643 width=16) (actual time=0.059..4.518 rows=14,643 loops=3)

37. 8.393 21.700 ↑ 1.0 24,517 3 / 3

Hash (cost=876.17..876.17 rows=24,517 width=43) (actual time=21.700..21.700 rows=24,517 loops=3)

  • Buckets: 32768 Batches: 1 Memory Usage: 2132kB
38. 13.307 13.307 ↑ 1.0 24,517 3 / 3

Seq Scan on d_subjektverzia subjektverzia (cost=0.00..876.17 rows=24,517 width=43) (actual time=0.056..13.307 rows=24,517 loops=3)

39. 0.452 2.785 ↑ 1.0 1,894 3 / 3

Hash (cost=221.94..221.94 rows=1,894 width=16) (actual time=2.785..2.785 rows=1,894 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 105kB
40. 2.333 2.333 ↑ 1.0 1,894 3 / 3

Seq Scan on d_vyzvaverzia vyzvaverzia (cost=0.00..221.94 rows=1,894 width=16) (actual time=0.042..2.333 rows=1,894 loops=3)

41. 0.071 0.199 ↑ 1.0 211 3 / 3

Hash (cost=6.11..6.11 rows=211 width=45) (actual time=0.199..0.199 rows=211 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
42. 0.128 0.128 ↑ 1.0 211 3 / 3

Seq Scan on d_organimplementaciefondov oif (cost=0.00..6.11 rows=211 width=45) (actual time=0.052..0.128 rows=211 loops=3)

43. 1.164 3.010 ↑ 1.0 8,552 3 / 3

Hash (cost=220.52..220.52 rows=8,552 width=16) (actual time=3.009..3.010 rows=8,552 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 529kB
44. 1.846 1.846 ↑ 1.0 8,552 3 / 3

Seq Scan on d_projekt projekt (cost=0.00..220.52 rows=8,552 width=16) (actual time=0.051..1.846 rows=8,552 loops=3)

45. 1.306 6.649 ↑ 1.8 2,853 3 / 3

Parallel Hash (cost=1,715.35..1,715.35 rows=5,035 width=75) (actual time=6.649..6.649 rows=2,853 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 1088kB
46. 5.343 5.343 ↓ 1.7 8,559 1 / 3

Parallel Seq Scan on d_projektverzia projektverzia (cost=0.00..1,715.35 rows=5,035 width=75) (actual time=0.032..16.030 rows=8,559 loops=1)

47. 40.325 40.325 ↑ 1.0 1 17,282 / 3

Index Scan using d_workflowstavaktualny_pkey on d_workflowstavaktualny workflowst7_ (cost=0.42..0.60 rows=1 width=25) (actual time=0.007..0.007 rows=1 loops=17,282)

  • Index Cond: (zonfp.workflowstavaktualny_id = id)
48. 0.074 0.204 ↑ 1.0 517 3 / 3

Hash (cost=12.17..12.17 rows=517 width=22) (actual time=0.203..0.204 rows=517 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 37kB
49. 0.130 0.130 ↑ 1.0 517 3 / 3

Seq Scan on d_workflowstav workflowst8_ (cost=0.00..12.17 rows=517 width=22) (actual time=0.035..0.130 rows=517 loops=3)

50. 0.054 0.152 ↑ 1.0 304 3 / 3

Hash (cost=10.04..10.04 rows=304 width=36) (actual time=0.152..0.152 rows=304 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 30kB
51. 0.098 0.098 ↑ 1.0 304 3 / 3

Seq Scan on d_stav stav (cost=0.00..10.04 rows=304 width=36) (actual time=0.023..0.098 rows=304 loops=3)

52. 0.042 0.151 ↑ 1.0 229 3 / 3

Hash (cost=7.29..7.29 rows=229 width=12) (actual time=0.150..0.151 rows=229 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
53. 0.109 0.109 ↑ 1.0 229 3 / 3

Seq Scan on d_faza faza (cost=0.00..7.29 rows=229 width=12) (actual time=0.029..0.109 rows=229 loops=3)

54. 0.335 0.748 ↑ 1.0 1,219 3 / 3

Hash (cost=35.19..35.19 rows=1,219 width=62) (actual time=0.748..0.748 rows=1,219 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 133kB
55. 0.413 0.413 ↑ 1.0 1,219 3 / 3

Seq Scan on d_workflowprechod workflowpr9_ (cost=0.00..35.19 rows=1,219 width=62) (actual time=0.037..0.413 rows=1,219 loops=3)

56. 63.367 63.367 ↑ 1.0 1 17,282 / 3

Index Scan using d_zonfpdraftverzia_pkey on d_zonfpdraftverzia dv (cost=0.29..0.52 rows=1 width=16) (actual time=0.011..0.011 rows=1 loops=17,282)

  • Index Cond: (id = zonfpverzia.draftzonfp_id)
57. 40.325 40.325 ↑ 1.0 1 17,282 / 3

Index Scan using d_odoslanie_pkey on d_odoslanie odoslanie (cost=0.42..0.51 rows=1 width=17) (actual time=0.007..0.007 rows=1 loops=17,282)

  • Index Cond: (id = dv.odoslanie_id)
58. 4.484 8.174 ↑ 1.0 38,915 1

Hash (cost=703.91..703.91 rows=38,915 width=8) (actual time=8.174..8.174 rows=38,915 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2033kB
59. 3.690 3.690 ↑ 1.0 38,915 1

Index Only Scan using d_zonfpverzia_pkey on d_zonfpverzia zonfpverzi1_ (cost=0.29..703.91 rows=38,915 width=8) (actual time=0.049..3.690 rows=38,915 loops=1)

  • Heap Fetches: 0
60. 5,006.974 12,517.435 ↑ 1.0 2 2,503,487

Bitmap Heap Scan on d_dokument dokument9_ (cost=3,904.52..3,906.75 rows=2 width=8) (actual time=0.005..0.005 rows=2 loops=2,503,487)

  • Recheck Cond: ((dokumenty8_.dokument_id = id) OR (dokumenty5_.dokument_id = id))
  • Heap Blocks: exact=4664406
61. 0.000 7,510.461 ↓ 0.0 0 2,503,487

BitmapOr (cost=3,904.52..3,904.52 rows=2 width=0) (actual time=0.003..0.003 rows=0 loops=2,503,487)

62. 2,503.487 2,503.487 ↑ 1.0 1 2,503,487

Bitmap Index Scan on d_dokument_pkey (cost=0.00..0.45 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=2,503,487)

  • Index Cond: (dokumenty8_.dokument_id = id)
63. 5,006.974 5,006.974 ↑ 1.0 1 2,503,487

Bitmap Index Scan on d_dokument_pkey (cost=0.00..0.68 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=2,503,487)

  • Index Cond: (dokumenty5_.dokument_id = id)
Planning time : 13.841 ms
Execution time : 27,967.359 ms