explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eEKD

Settings
# exclusive inclusive rows x rows loops node
1. 0.042 9,797.507 ↑ 1,574.0 1 1

Sort (cost=923,650.16..923,654.09 rows=1,574 width=2,106) (actual time=9,797.507..9,797.507 rows=1 loops=1)

  • Sort Key: wf_instance.id
  • Sort Method: quicksort Memory: 25kB
2.          

CTE parent_instance

3. 0.000 13.549 ↓ 0.0 0 1

Hash Left Join (cost=1,330.10..1,591.36 rows=500 width=16) (actual time=13.549..13.549 rows=0 loops=1)

  • Hash Cond: (wf_2.id = wf_instance_notification.notification_instance_id)
4. 0.000 13.549 ↓ 0.0 0 1

Nested Loop (cost=1,328.72..1,586.43 rows=500 width=12) (actual time=13.549..13.549 rows=0 loops=1)

5. 0.083 13.549 ↓ 0.0 0 1

Hash Join (cost=1,328.43..1,355.30 rows=500 width=22) (actual time=13.549..13.549 rows=0 loops=1)

  • Hash Cond: (wf_2.id = tz.teczka_zawartosc_uid)
6. 0.014 0.014 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wf_2 (cost=0.00..20.00 rows=500 width=8) (actual time=0.013..0.014 rows=2 loops=1)

  • Filter: (NOT deleted)
7. 6.008 13.452 ↓ 1.0 38,109 1

Hash (cost=852.08..852.08 rows=38,108 width=18) (actual time=13.452..13.452 rows=38,109 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,373kB
8. 7.444 7.444 ↓ 1.0 38,109 1

Seq Scan on eurzad_teczka_zawartosc tz (cost=0.00..852.08 rows=38,108 width=18) (actual time=0.010..7.444 rows=38,109 loops=1)

9. 0.000 0.000 ↓ 0.0 0

Index Scan using eurzad_teczka_pkey on eurzad_teczka t (cost=0.29..0.45 rows=1 width=18) (never executed)

  • Index Cond: ((teczka_uid)::text = (tz.teczka_uid)::text)
10. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.17..1.17 rows=17 width=16) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Seq Scan on wf_instance_notification (cost=0.00..1.17 rows=17 width=16) (never executed)

12. 27.792 9,797.465 ↑ 1,574.0 1 1

Hash Right Join (cost=848,186.42..921,975.22 rows=1,574 width=2,106) (actual time=9,797.464..9,797.465 rows=1 loops=1)

  • Hash Cond: (wi_5.id = wf_instance.id)
13. 19.959 1,065.122 ↓ 1.4 184,196 1

Append (cost=4,948.74..76,958.11 rows=128,953 width=806) (actual time=264.757..1,065.122 rows=184,196 loops=1)

14. 0.001 0.041 ↓ 0.0 0 1

GroupAggregate (cost=4,948.74..4,966.43 rows=283 width=88) (actual time=0.041..0.041 rows=0 loops=1)

  • Group Key: wi_5.id, efs.form_struktura_pole, efs.form_struktura_opis, efs.form_struktura_typ
15. 0.005 0.040 ↓ 0.0 0 1

Sort (cost=4,948.74..4,949.45 rows=283 width=167) (actual time=0.040..0.040 rows=0 loops=1)

  • Sort Key: wi_5.id, efs.form_struktura_pole, efs.form_struktura_opis, efs.form_struktura_typ
  • Sort Method: quicksort Memory: 25kB
16. 0.001 0.035 ↓ 0.0 0 1

Merge Left Join (cost=4,789.82..4,937.21 rows=283 width=167) (actual time=0.035..0.035 rows=0 loops=1)

  • Merge Cond: (efd.form_dane_wartosc = (((ug.group_id)::character varying)::text))
17. 0.001 0.034 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,662.43..4,803.01 rows=283 width=129) (actual time=0.034..0.034 rows=0 loops=1)

18. 0.001 0.033 ↓ 0.0 0 1

Merge Left Join (cost=4,662.01..4,673.05 rows=283 width=93) (actual time=0.033..0.033 rows=0 loops=1)

  • Merge Cond: (efd.form_dane_wartosc = (((ed.id)::character varying)::text))
19. 0.003 0.032 ↓ 0.0 0 1

Sort (cost=4,604.84..4,605.55 rows=283 width=78) (actual time=0.032..0.032 rows=0 loops=1)

  • Sort Key: efd.form_dane_wartosc
  • Sort Method: quicksort Memory: 25kB
20. 0.001 0.029 ↓ 0.0 0 1

Hash Join (cost=19.57..4,593.32 rows=283 width=78) (actual time=0.029..0.029 rows=0 loops=1)

  • Hash Cond: (efd.eurzad_form_struktura_id = efs.form_struktura_id)
21. 0.005 0.028 ↓ 0.0 0 1

Nested Loop (cost=0.43..4,551.67 rows=5,247 width=38) (actual time=0.028..0.028 rows=0 loops=1)

22. 0.013 0.013 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_5 (cost=0.00..20.00 rows=500 width=8) (actual time=0.013..0.013 rows=2 loops=1)

  • Filter: (NOT deleted)
23. 0.010 0.010 ↓ 0.0 0 2

Index Scan using eurzad_form_dane_sprawa on eurzad_form_dane efd (cost=0.43..8.96 rows=10 width=34) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (sprawa_uid = wi_5.id)
  • Filter: (form_dane_wartosc <> ''::text)
24. 0.000 0.000 ↓ 0.0 0

Hash (cost=18.79..18.79 rows=28 width=52) (never executed)

25. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_form_struktura efs (cost=0.00..18.79 rows=28 width=52) (never executed)

  • Filter: ((form_struktura_opis = 'Streszczenie pisma'::text) OR ((form_struktura_pole)::text = 'tresc_wniosku'::text))
26. 0.000 0.000 ↓ 0.0 0

Sort (cost=57.16..59.19 rows=809 width=19) (never executed)

  • Sort Key: (((ed.id)::character varying)::text)
27. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_dictionary_content ed (cost=0.00..18.09 rows=809 width=19) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Index Scan using suppliant_address_petent_uid_idx on suppliant_address sa (cost=0.42..0.45 rows=1 width=50) (never executed)

  • Index Cond: ((petent_uid)::text = efd.form_dane_wartosc)
29. 0.000 0.000 ↓ 0.0 0

Sort (cost=127.39..128.55 rows=462 width=42) (never executed)

  • Sort Key: (((ug.group_id)::character varying)::text)
30. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=68.35..106.95 rows=462 width=42) (never executed)

  • Hash Cond: (uug."userId" = uu."userId")
31. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=37.40..69.64 rows=462 width=14) (never executed)

  • Hash Cond: (ug.parent_group_id = pug.group_id)
32. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=18.70..44.59 rows=462 width=15) (never executed)

  • Hash Cond: (uug.group_id = ug.group_id)
33. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_usergroups uug (cost=0.00..19.54 rows=462 width=8) (never executed)

  • Filter: ((status)::text = 'A'::text)
34. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=11) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups ug (cost=0.00..12.20 rows=520 width=11) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=7) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups pug (cost=0.00..12.20 rows=520 width=7) (never executed)

38. 0.000 0.000 ↓ 0.0 0

Hash (cost=25.71..25.71 rows=419 width=36) (never executed)

39. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_users uu (cost=0.00..25.71 rows=419 width=36) (never executed)

40. 38.722 1,045.122 ↓ 1.4 184,196 1

Subquery Scan on *SELECT* 2 (cost=65,879.62..71,988.85 rows=128,670 width=79) (actual time=264.714..1,045.122 rows=184,196 loops=1)

41. 637.322 1,006.400 ↓ 1.4 184,196 1

GroupAggregate (cost=65,879.62..70,380.48 rows=128,670 width=75) (actual time=264.711..1,006.400 rows=184,196 loops=1)

  • Group Key: pbm_pola.id, pbm_pola.pole, pbm_pola.opis, pbm_pola.typ
42. 266.300 369.078 ↓ 1.1 184,199 1

Sort (cost=65,879.62..66,308.09 rows=171,387 width=74) (actual time=264.678..369.078 rows=184,199 loops=1)

  • Sort Key: pbm_pola.id, pbm_pola.pole, pbm_pola.opis, pbm_pola.typ
  • Sort Method: external merge Disk: 26,072kB
43. 72.022 102.778 ↓ 1.1 184,199 1

Bitmap Heap Scan on proces_biezacy_metryka_pola_mv pbm_pola (cost=8,675.69..43,364.18 rows=171,387 width=74) (actual time=31.456..102.778 rows=184,199 loops=1)

  • Recheck Cond: ((opis = 'Streszczenie pisma'::text) OR ((pole)::text = 'tresc_wniosku'::text))
  • Filter: (NOT (hashed SubPlan 7))
  • Heap Blocks: exact=4,536
44. 0.003 30.743 ↓ 0.0 0 1

BitmapOr (cost=8,653.19..8,653.19 rows=357,685 width=0) (actual time=30.743..30.743 rows=0 loops=1)

45. 15.192 15.192 ↓ 1.0 177,136 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_opis_index (cost=0.00..4,408.55 rows=175,483 width=0) (actual time=15.192..15.192 rows=177,136 loops=1)

  • Index Cond: (opis = 'Streszczenie pisma'::text)
46. 15.548 15.548 ↓ 1.0 184,199 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_pole_index (cost=0.00..4,158.94 rows=182,202 width=0) (actual time=15.548..15.548 rows=184,199 loops=1)

  • Index Cond: ((pole)::text = 'tresc_wniosku'::text)
47.          

SubPlan (for Bitmap Heap Scan)

48. 0.013 0.013 ↑ 500.0 2 1

Seq Scan on wf_instance_indexed wf_instance_indexed_3 (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.012..0.013 rows=2 loops=1)

49. 0.008 8,704.551 ↑ 1,574.0 1 1

Hash (cost=843,218.00..843,218.00 rows=1,574 width=2,066) (actual time=8,704.551..8,704.551 rows=1 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
50. 38.791 8,704.543 ↑ 1,574.0 1 1

Hash Right Join (cost=785,187.88..843,218.00 rows=1,574 width=2,066) (actual time=8,154.827..8,704.543 rows=1 loops=1)

  • Hash Cond: (wi_6.id = wf_instance.id)
51. 28.651 1,250.434 ↓ 2.3 220,324 1

Append (cost=5,061.75..61,786.72 rows=94,582 width=806) (actual time=276.498..1,250.434 rows=220,324 loops=1)

52. 0.001 0.058 ↓ 0.0 0 1

GroupAggregate (cost=5,061.75..5,091.43 rows=475 width=88) (actual time=0.058..0.058 rows=0 loops=1)

  • Group Key: wi_6.id, efs_1.form_struktura_pole, efs_1.form_struktura_opis, efs_1.form_struktura_typ
53. 0.005 0.057 ↓ 0.0 0 1

Sort (cost=5,061.75..5,062.93 rows=475 width=167) (actual time=0.057..0.057 rows=0 loops=1)

  • Sort Key: wi_6.id, efs_1.form_struktura_pole, efs_1.form_struktura_opis, efs_1.form_struktura_typ
  • Sort Method: quicksort Memory: 25kB
54. 0.001 0.052 ↓ 0.0 0 1

Merge Left Join (cost=4,801.57..5,040.63 rows=475 width=167) (actual time=0.052..0.052 rows=0 loops=1)

  • Merge Cond: (efd_1.form_dane_wartosc = (((ug_1.group_id)::character varying)::text))
55. 0.001 0.051 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,674.18..4,904.93 rows=475 width=129) (actual time=0.051..0.051 rows=0 loops=1)

56. 0.001 0.050 ↓ 0.0 0 1

Merge Left Join (cost=4,673.76..4,686.80 rows=475 width=93) (actual time=0.050..0.050 rows=0 loops=1)

  • Merge Cond: (efd_1.form_dane_wartosc = (((ed_1.id)::character varying)::text))
57. 0.003 0.049 ↓ 0.0 0 1

Sort (cost=4,616.59..4,617.78 rows=475 width=78) (actual time=0.049..0.049 rows=0 loops=1)

  • Sort Key: efd_1.form_dane_wartosc
  • Sort Method: quicksort Memory: 25kB
58. 0.002 0.046 ↓ 0.0 0 1

Hash Join (cost=19.80..4,595.47 rows=475 width=78) (actual time=0.046..0.046 rows=0 loops=1)

  • Hash Cond: (efd_1.eurzad_form_struktura_id = efs_1.form_struktura_id)
59. 0.004 0.044 ↓ 0.0 0 1

Nested Loop (cost=0.43..4,551.67 rows=5,247 width=38) (actual time=0.044..0.044 rows=0 loops=1)

60. 0.022 0.022 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_6 (cost=0.00..20.00 rows=500 width=8) (actual time=0.021..0.022 rows=2 loops=1)

  • Filter: (NOT deleted)
61. 0.018 0.018 ↓ 0.0 0 2

Index Scan using eurzad_form_dane_sprawa on eurzad_form_dane efd_1 (cost=0.43..8.96 rows=10 width=34) (actual time=0.009..0.009 rows=0 loops=2)

  • Index Cond: (sprawa_uid = wi_6.id)
  • Filter: (form_dane_wartosc <> ''::text)
62. 0.000 0.000 ↓ 0.0 0

Hash (cost=18.79..18.79 rows=47 width=52) (never executed)

63. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_form_struktura efs_1 (cost=0.00..18.79 rows=47 width=52) (never executed)

  • Filter: ((form_struktura_opis = 'Załączniki'::text) OR ((form_struktura_pole)::text = 'pliki'::text))
64. 0.000 0.000 ↓ 0.0 0

Sort (cost=57.16..59.19 rows=809 width=19) (never executed)

  • Sort Key: (((ed_1.id)::character varying)::text)
65. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_dictionary_content ed_1 (cost=0.00..18.09 rows=809 width=19) (never executed)

66. 0.000 0.000 ↓ 0.0 0

Index Scan using suppliant_address_petent_uid_idx on suppliant_address sa_1 (cost=0.42..0.45 rows=1 width=50) (never executed)

  • Index Cond: ((petent_uid)::text = efd_1.form_dane_wartosc)
67. 0.000 0.000 ↓ 0.0 0

Sort (cost=127.39..128.55 rows=462 width=42) (never executed)

  • Sort Key: (((ug_1.group_id)::character varying)::text)
68. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=68.35..106.95 rows=462 width=42) (never executed)

  • Hash Cond: (uug_1."userId" = uu_1."userId")
69. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=37.40..69.64 rows=462 width=14) (never executed)

  • Hash Cond: (ug_1.parent_group_id = pug_1.group_id)
70. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=18.70..44.59 rows=462 width=15) (never executed)

  • Hash Cond: (uug_1.group_id = ug_1.group_id)
71. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_usergroups uug_1 (cost=0.00..19.54 rows=462 width=8) (never executed)

  • Filter: ((status)::text = 'A'::text)
72. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=11) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups ug_1 (cost=0.00..12.20 rows=520 width=11) (never executed)

74. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=7) (never executed)

75. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups pug_1 (cost=0.00..12.20 rows=520 width=7) (never executed)

76. 0.000 0.000 ↓ 0.0 0

Hash (cost=25.71..25.71 rows=419 width=36) (never executed)

77. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_users uu_1 (cost=0.00..25.71 rows=419 width=36) (never executed)

78. 50.689 1,221.725 ↓ 2.3 220,324 1

Subquery Scan on *SELECT* 2_1 (cost=52,391.14..56,690.54 rows=94,107 width=79) (actual time=276.439..1,221.725 rows=220,324 loops=1)

79. 833.580 1,171.036 ↓ 2.3 220,324 1

GroupAggregate (cost=52,391.14..55,514.20 rows=94,107 width=75) (actual time=276.434..1,171.036 rows=220,324 loops=1)

  • Group Key: pbm_pola_1.id, pbm_pola_1.pole, pbm_pola_1.opis, pbm_pola_1.typ
80. 235.638 337.456 ↓ 1.9 220,327 1

Sort (cost=52,391.14..52,676.39 rows=114,097 width=74) (actual time=276.363..337.456 rows=220,327 loops=1)

  • Sort Key: pbm_pola_1.id, pbm_pola_1.pole, pbm_pola_1.opis, pbm_pola_1.typ
  • Sort Method: external merge Disk: 11,432kB
81. 84.012 101.818 ↓ 1.9 220,327 1

Bitmap Heap Scan on proces_biezacy_metryka_pola_mv pbm_pola_1 (cost=5,306.65..37,735.55 rows=114,097 width=74) (actual time=18.229..101.818 rows=220,327 loops=1)

  • Recheck Cond: ((opis = 'Załączniki'::text) OR ((pole)::text = 'pliki'::text))
  • Filter: (NOT (hashed SubPlan 9))
  • Heap Blocks: exact=2,726
82. 0.002 17.793 ↓ 0.0 0 1

BitmapOr (cost=5,284.15..5,284.15 rows=228,566 width=0) (actual time=17.793..17.793 rows=0 loops=1)

83. 0.029 0.029 ↑ 37.7 94 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_opis_index (cost=0.00..91.03 rows=3,547 width=0) (actual time=0.029..0.029 rows=94 loops=1)

  • Index Cond: (opis = 'Załączniki'::text)
84. 17.762 17.762 ↑ 1.0 220,327 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_pole_index (cost=0.00..5,136.07 rows=225,018 width=0) (actual time=17.762..17.762 rows=220,327 loops=1)

  • Index Cond: ((pole)::text = 'pliki'::text)
85.          

SubPlan (for Bitmap Heap Scan)

86. 0.013 0.013 ↑ 500.0 2 1

Seq Scan on wf_instance_indexed wf_instance_indexed_5 (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.013..0.013 rows=2 loops=1)

87. 0.003 7,415.318 ↑ 1,574.0 1 1

Hash (cost=780,106.46..780,106.46 rows=1,574 width=2,034) (actual time=7,415.318..7,415.318 rows=1 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
88. 13.548 7,415.315 ↑ 1,574.0 1 1

Hash Right Join (cost=726,821.02..780,106.46 rows=1,574 width=2,034) (actual time=7,125.187..7,415.315 rows=1 loops=1)

  • Hash Cond: (wi_7.id = wf_instance.id)
89. 9.445 502.373 ↓ 1.2 95,800 1

Append (cost=5,044.00..57,213.16 rows=80,896 width=806) (actual time=157.117..502.373 rows=95,800 loops=1)

90. 0.001 0.055 ↓ 0.0 0 1

GroupAggregate (cost=5,044.00..5,071.81 rows=445 width=88) (actual time=0.055..0.055 rows=0 loops=1)

  • Group Key: wi_7.id, efs_2.form_struktura_pole, efs_2.form_struktura_opis, efs_2.form_struktura_typ
91. 0.006 0.054 ↓ 0.0 0 1

Sort (cost=5,044.00..5,045.11 rows=445 width=167) (actual time=0.054..0.054 rows=0 loops=1)

  • Sort Key: wi_7.id, efs_2.form_struktura_pole, efs_2.form_struktura_opis, efs_2.form_struktura_typ
  • Sort Method: quicksort Memory: 25kB
92. 0.001 0.048 ↓ 0.0 0 1

Merge Left Join (cost=4,799.69..5,024.43 rows=445 width=167) (actual time=0.048..0.048 rows=0 loops=1)

  • Merge Cond: (efd_2.form_dane_wartosc = (((ug_2.group_id)::character varying)::text))
93. 0.001 0.047 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,672.30..4,888.97 rows=445 width=129) (actual time=0.047..0.047 rows=0 loops=1)

94. 0.001 0.046 ↓ 0.0 0 1

Merge Left Join (cost=4,671.88..4,684.61 rows=445 width=93) (actual time=0.046..0.046 rows=0 loops=1)

  • Merge Cond: (efd_2.form_dane_wartosc = (((ed_2.id)::character varying)::text))
95. 0.002 0.045 ↓ 0.0 0 1

Sort (cost=4,614.71..4,615.82 rows=445 width=78) (actual time=0.045..0.045 rows=0 loops=1)

  • Sort Key: efd_2.form_dane_wartosc
  • Sort Method: quicksort Memory: 25kB
96. 0.001 0.043 ↓ 0.0 0 1

Hash Join (cost=19.77..4,595.14 rows=445 width=78) (actual time=0.043..0.043 rows=0 loops=1)

  • Hash Cond: (efd_2.eurzad_form_struktura_id = efs_2.form_struktura_id)
97. 0.004 0.042 ↓ 0.0 0 1

Nested Loop (cost=0.43..4,551.67 rows=5,247 width=38) (actual time=0.042..0.042 rows=0 loops=1)

98. 0.022 0.022 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_7 (cost=0.00..20.00 rows=500 width=8) (actual time=0.021..0.022 rows=2 loops=1)

  • Filter: (NOT deleted)
99. 0.016 0.016 ↓ 0.0 0 2

Index Scan using eurzad_form_dane_sprawa on eurzad_form_dane efd_2 (cost=0.43..8.96 rows=10 width=34) (actual time=0.008..0.008 rows=0 loops=2)

  • Index Cond: (sprawa_uid = wi_7.id)
  • Filter: (form_dane_wartosc <> ''::text)
100. 0.000 0.000 ↓ 0.0 0

Hash (cost=18.79..18.79 rows=44 width=52) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_form_struktura efs_2 (cost=0.00..18.79 rows=44 width=52) (never executed)

  • Filter: ((form_struktura_opis = 'Tytuł dokumentu'::text) OR ((form_struktura_pole)::text = 'dokument_tytul'::text))
102. 0.000 0.000 ↓ 0.0 0

Sort (cost=57.16..59.19 rows=809 width=19) (never executed)

  • Sort Key: (((ed_2.id)::character varying)::text)
103. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_dictionary_content ed_2 (cost=0.00..18.09 rows=809 width=19) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Index Scan using suppliant_address_petent_uid_idx on suppliant_address sa_2 (cost=0.42..0.45 rows=1 width=50) (never executed)

  • Index Cond: ((petent_uid)::text = efd_2.form_dane_wartosc)
105. 0.000 0.000 ↓ 0.0 0

Sort (cost=127.39..128.55 rows=462 width=42) (never executed)

  • Sort Key: (((ug_2.group_id)::character varying)::text)
106. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=68.35..106.95 rows=462 width=42) (never executed)

  • Hash Cond: (uug_2."userId" = uu_2."userId")
107. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=37.40..69.64 rows=462 width=14) (never executed)

  • Hash Cond: (ug_2.parent_group_id = pug_2.group_id)
108. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=18.70..44.59 rows=462 width=15) (never executed)

  • Hash Cond: (uug_2.group_id = ug_2.group_id)
109. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_usergroups uug_2 (cost=0.00..19.54 rows=462 width=8) (never executed)

  • Filter: ((status)::text = 'A'::text)
110. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=11) (never executed)

111. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups ug_2 (cost=0.00..12.20 rows=520 width=11) (never executed)

112. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=7) (never executed)

113. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups pug_2 (cost=0.00..12.20 rows=520 width=7) (never executed)

114. 0.000 0.000 ↓ 0.0 0

Hash (cost=25.71..25.71 rows=419 width=36) (never executed)

115. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_users uu_2 (cost=0.00..25.71 rows=419 width=36) (never executed)

116. 16.816 492.873 ↓ 1.2 95,800 1

Subquery Scan on *SELECT* 2_2 (cost=48,508.57..52,136.89 rows=80,451 width=79) (actual time=157.060..492.873 rows=95,800 loops=1)

117. 289.149 476.057 ↓ 1.2 95,800 1

GroupAggregate (cost=48,508.57..51,131.26 rows=80,451 width=75) (actual time=157.057..476.057 rows=95,800 loops=1)

  • Group Key: pbm_pola_2.id, pbm_pola_2.pole, pbm_pola_2.opis, pbm_pola_2.typ
118. 130.434 186.908 ↓ 1.0 95,800 1

Sort (cost=48,508.57..48,744.55 rows=94,395 width=74) (actual time=157.017..186.908 rows=95,800 loops=1)

  • Sort Key: pbm_pola_2.id, pbm_pola_2.pole, pbm_pola_2.opis, pbm_pola_2.typ
  • Sort Method: external merge Disk: 14,440kB
119. 40.119 56.474 ↓ 1.0 95,800 1

Bitmap Heap Scan on proces_biezacy_metryka_pola_mv pbm_pola_2 (cost=4,703.09..36,512.01 rows=94,395 width=74) (actual time=16.696..56.474 rows=95,800 loops=1)

  • Recheck Cond: ((opis = 'Tytuł dokumentu'::text) OR ((pole)::text = 'dokument_tytul'::text))
  • Filter: (NOT (hashed SubPlan 6))
  • Heap Blocks: exact=2,079
120. 0.002 16.344 ↓ 0.0 0 1

BitmapOr (cost=4,680.59..4,680.59 rows=193,138 width=0) (actual time=16.344..16.344 rows=0 loops=1)

121. 8.565 8.565 ↑ 1.0 95,800 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_opis_index (cost=0.00..2,428.70 rows=96,569 width=0) (actual time=8.565..8.565 rows=95,800 loops=1)

  • Index Cond: (opis = 'Tytuł dokumentu'::text)
122. 7.777 7.777 ↑ 1.0 95,770 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_pole_index (cost=0.00..2,204.70 rows=96,569 width=0) (actual time=7.777..7.777 rows=95,770 loops=1)

  • Index Cond: ((pole)::text = 'dokument_tytul'::text)
123.          

SubPlan (for Bitmap Heap Scan)

124. 0.011 0.011 ↑ 500.0 2 1

Seq Scan on wf_instance_indexed wf_instance_indexed_2 (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.011..0.011 rows=2 loops=1)

125. 0.005 6,899.394 ↑ 1,574.0 1 1

Hash (cost=721,757.34..721,757.34 rows=1,574 width=2,002) (actual time=6,899.394..6,899.394 rows=1 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
126. 14.101 6,899.389 ↑ 1,574.0 1 1

Hash Right Join (cost=672,540.70..721,757.34 rows=1,574 width=2,002) (actual time=6,698.144..6,899.389 rows=1 loops=1)

  • Hash Cond: (wi_8.id = wf_instance.id)
127. 9.629 703.949 ↓ 1.2 83,742 1

Append (cost=5,026.28..53,282.68 rows=69,588 width=806) (actual time=354.639..703.949 rows=83,742 loops=1)

128. 0.002 0.161 ↓ 0.0 0 1

GroupAggregate (cost=5,026.28..5,052.22 rows=415 width=88) (actual time=0.161..0.161 rows=0 loops=1)

  • Group Key: wi_8.id, efs_3.form_struktura_pole, efs_3.form_struktura_opis, efs_3.form_struktura_typ
129. 0.072 0.159 ↓ 0.0 0 1

Sort (cost=5,026.28..5,027.32 rows=415 width=167) (actual time=0.159..0.159 rows=0 loops=1)

  • Sort Key: wi_8.id, efs_3.form_struktura_pole, efs_3.form_struktura_opis, efs_3.form_struktura_typ
  • Sort Method: quicksort Memory: 25kB
130. 0.001 0.087 ↓ 0.0 0 1

Merge Left Join (cost=4,797.82..5,008.24 rows=415 width=167) (actual time=0.087..0.087 rows=0 loops=1)

  • Merge Cond: (efd_3.form_dane_wartosc = (((ug_3.group_id)::character varying)::text))
131. 0.001 0.086 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,670.43..4,873.01 rows=415 width=129) (actual time=0.086..0.086 rows=0 loops=1)

132. 0.002 0.085 ↓ 0.0 0 1

Merge Left Join (cost=4,670.01..4,682.43 rows=415 width=93) (actual time=0.085..0.085 rows=0 loops=1)

  • Merge Cond: (efd_3.form_dane_wartosc = (((ed_3.id)::character varying)::text))
133. 0.008 0.083 ↓ 0.0 0 1

Sort (cost=4,612.84..4,613.88 rows=415 width=78) (actual time=0.083..0.083 rows=0 loops=1)

  • Sort Key: efd_3.form_dane_wartosc
  • Sort Method: quicksort Memory: 25kB
134. 0.001 0.075 ↓ 0.0 0 1

Hash Join (cost=19.73..4,594.80 rows=415 width=78) (actual time=0.075..0.075 rows=0 loops=1)

  • Hash Cond: (efd_3.eurzad_form_struktura_id = efs_3.form_struktura_id)
135. 0.010 0.074 ↓ 0.0 0 1

Nested Loop (cost=0.43..4,551.67 rows=5,247 width=38) (actual time=0.074..0.074 rows=0 loops=1)

136. 0.036 0.036 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_8 (cost=0.00..20.00 rows=500 width=8) (actual time=0.034..0.036 rows=2 loops=1)

  • Filter: (NOT deleted)
137. 0.028 0.028 ↓ 0.0 0 2

Index Scan using eurzad_form_dane_sprawa on eurzad_form_dane efd_3 (cost=0.43..8.96 rows=10 width=34) (actual time=0.014..0.014 rows=0 loops=2)

  • Index Cond: (sprawa_uid = wi_8.id)
  • Filter: (form_dane_wartosc <> ''::text)
138. 0.000 0.000 ↓ 0.0 0

Hash (cost=18.79..18.79 rows=41 width=52) (never executed)

139. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_form_struktura efs_3 (cost=0.00..18.79 rows=41 width=52) (never executed)

  • Filter: ((form_struktura_opis = 'Oznaczenie dokumentu'::text) OR ((form_struktura_pole)::text = 'nr_na_pismie'::text))
140. 0.000 0.000 ↓ 0.0 0

Sort (cost=57.16..59.19 rows=809 width=19) (never executed)

  • Sort Key: (((ed_3.id)::character varying)::text)
141. 0.000 0.000 ↓ 0.0 0

Seq Scan on eurzad_dictionary_content ed_3 (cost=0.00..18.09 rows=809 width=19) (never executed)

142. 0.000 0.000 ↓ 0.0 0

Index Scan using suppliant_address_petent_uid_idx on suppliant_address sa_3 (cost=0.42..0.45 rows=1 width=50) (never executed)

  • Index Cond: ((petent_uid)::text = efd_3.form_dane_wartosc)
143. 0.000 0.000 ↓ 0.0 0

Sort (cost=127.39..128.55 rows=462 width=42) (never executed)

  • Sort Key: (((ug_3.group_id)::character varying)::text)
144. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=68.35..106.95 rows=462 width=42) (never executed)

  • Hash Cond: (uug_3."userId" = uu_3."userId")
145. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=37.40..69.64 rows=462 width=14) (never executed)

  • Hash Cond: (ug_3.parent_group_id = pug_3.group_id)
146. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=18.70..44.59 rows=462 width=15) (never executed)

  • Hash Cond: (uug_3.group_id = ug_3.group_id)
147. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_usergroups uug_3 (cost=0.00..19.54 rows=462 width=8) (never executed)

  • Filter: ((status)::text = 'A'::text)
148. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=11) (never executed)

149. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups ug_3 (cost=0.00..12.20 rows=520 width=11) (never executed)

150. 0.000 0.000 ↓ 0.0 0

Hash (cost=12.20..12.20 rows=520 width=7) (never executed)

151. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_groups pug_3 (cost=0.00..12.20 rows=520 width=7) (never executed)

152. 0.000 0.000 ↓ 0.0 0

Hash (cost=25.71..25.71 rows=419 width=36) (never executed)

153. 0.000 0.000 ↓ 0.0 0

Seq Scan on users_users uu_3 (cost=0.00..25.71 rows=419 width=36) (never executed)

154. 18.363 694.159 ↓ 1.2 83,742 1

Subquery Scan on *SELECT* 2_3 (cost=45,137.35..48,226.31 rows=69,173 width=79) (actual time=354.474..694.159 rows=83,742 loops=1)

155. 298.482 675.796 ↓ 1.2 83,742 1

GroupAggregate (cost=45,137.35..47,361.64 rows=69,173 width=75) (actual time=354.468..675.796 rows=83,742 loops=1)

  • Group Key: pbm_pola_3.id, pbm_pola_3.pole, pbm_pola_3.opis, pbm_pola_3.typ
156. 236.264 377.314 ↓ 1.1 83,744 1

Sort (cost=45,137.35..45,335.14 rows=79,113 width=74) (actual time=354.380..377.314 rows=83,744 loops=1)

  • Sort Key: pbm_pola_3.id, pbm_pola_3.pole, pbm_pola_3.opis, pbm_pola_3.typ
  • Sort Method: external merge Disk: 7,080kB
157. 105.368 141.050 ↓ 1.1 83,744 1

Bitmap Heap Scan on proces_biezacy_metryka_pola_mv pbm_pola_3 (cost=3,932.35..35,183.37 rows=79,113 width=74) (actual time=36.788..141.050 rows=83,744 loops=1)

  • Recheck Cond: ((opis = 'Oznaczenie dokumentu'::text) OR ((pole)::text = 'nr_na_pismie'::text))
  • Filter: (NOT (hashed SubPlan 8))
  • Heap Blocks: exact=2,626
158. 0.003 35.649 ↓ 0.0 0 1

BitmapOr (cost=3,909.85..3,909.85 rows=161,258 width=0) (actual time=35.649..35.649 rows=0 loops=1)

159. 18.453 18.453 ↓ 1.0 83,744 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_opis_index (cost=0.00..2,029.15 rows=80,629 width=0) (actual time=18.453..18.453 rows=83,744 loops=1)

  • Index Cond: (opis = 'Oznaczenie dokumentu'::text)
160. 17.193 17.193 ↓ 1.0 83,744 1

Bitmap Index Scan on proces_biezacy_metryka_pola_mv_pole_index (cost=0.00..1,841.15 rows=80,629 width=0) (actual time=17.193..17.193 rows=83,744 loops=1)

  • Index Cond: ((pole)::text = 'nr_na_pismie'::text)
161.          

SubPlan (for Bitmap Heap Scan)

162. 0.033 0.033 ↑ 500.0 2 1

Seq Scan on wf_instance_indexed wf_instance_indexed_4 (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.031..0.033 rows=2 loops=1)

163. 0.003 6,181.339 ↑ 1,574.0 1 1

Hash (cost=667,494.74..667,494.74 rows=1,574 width=1,970) (actual time=6,181.339..6,181.339 rows=1 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 17kB
164. 0.015 6,181.336 ↑ 1,574.0 1 1

Nested Loop Left Join (cost=561,714.39..667,494.74 rows=1,574 width=1,970) (actual time=5,999.855..6,181.336 rows=1 loops=1)

165. 0.016 6,181.262 ↑ 963.0 1 1

Hash Left Join (cost=561,713.13..665,850.85 rows=963 width=1,966) (actual time=5,999.784..6,181.262 rows=1 loops=1)

  • Hash Cond: (wf_instance.id = pi.id)
166. 0.004 6,167.693 ↑ 963.0 1 1

Nested Loop Left Join (cost=557,668.00..661,743.12 rows=963 width=1,902) (actual time=5,986.216..6,167.693 rows=1 loops=1)

167. 0.009 6,167.671 ↑ 963.0 1 1

Nested Loop Left Join (cost=557,667.71..661,435.72 rows=963 width=1,902) (actual time=5,986.194..6,167.671 rows=1 loops=1)

168. 59.031 6,167.630 ↑ 963.0 1 1

Hash Right Join (cost=557,667.29..660,937.10 rows=963 width=1,898) (actual time=5,986.155..6,167.630 rows=1 loops=1)

  • Hash Cond: (wi_9.id = wf_instance.id)
169. 1,492.261 2,113.142 ↑ 1.0 291,242 1

Hash Join (cost=11,977.08..111,230.67 rows=291,452 width=36) (actual time=134.927..2,113.142 rows=291,242 loops=1)

  • Hash Cond: (wi_9.activity_id = pa.id)
170. 338.375 620.750 ↑ 1.0 291,242 1

Hash Right Join (cost=11,960.85..27,057.68 rows=291,452 width=22) (actual time=134.205..620.750 rows=291,242 loops=1)

  • Hash Cond: (esp_1.sprawa_uid = wi_9.id)
171. 148.459 148.459 ↑ 1.0 320,495 1

Seq Scan on eurzad_sprawa_przedluzanie esp_1 (cost=0.00..6,428.95 rows=320,495 width=14) (actual time=0.020..148.459 rows=320,495 loops=1)

172. 64.062 133.916 ↑ 1.0 291,242 1

Hash (cost=6,893.70..6,893.70 rows=291,452 width=12) (actual time=133.916..133.916 rows=291,242 loops=1)

  • Buckets: 262,144 Batches: 4 Memory Usage: 5,447kB
173. 69.854 69.854 ↑ 1.0 291,242 1

Seq Scan on wf_instance wi_9 (cost=0.00..6,893.70 rows=291,452 width=12) (actual time=0.014..69.854 rows=291,242 loops=1)

  • Filter: (NOT deleted)
  • Rows Removed by Filter: 29,535
174. 0.042 0.131 ↑ 1.0 277 1

Hash (cost=12.77..12.77 rows=277 width=13) (actual time=0.131..0.131 rows=277 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 21kB
175. 0.089 0.089 ↑ 1.0 277 1

Seq Scan on pe_activity pa (cost=0.00..12.77 rows=277 width=13) (actual time=0.018..0.089 rows=277 loops=1)

176. 0.019 3,995.457 ↑ 963.0 1 1

Hash (cost=545,678.17..545,678.17 rows=963 width=1,866) (actual time=3,995.457..3,995.457 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
177. 0.004 3,995.438 ↑ 963.0 1 1

Merge Left Join (cost=525,794.31..545,678.17 rows=963 width=1,866) (actual time=3,701.498..3,995.438 rows=1 loops=1)

  • Merge Cond: (wf_instance.id = wi.id)
178. 0.010 3,995.300 ↑ 963.0 1 1

Nested Loop (cost=525,705.42..545,586.82 rows=963 width=1,834) (actual time=3,701.361..3,995.300 rows=1 loops=1)

179. 37.264 3,995.246 ↑ 1,060.0 1 1

Subquery Scan on combined_views (cost=525,705.00..538,421.82 rows=1,060 width=1,838) (actual time=3,701.309..3,995.246 rows=1 loops=1)

  • Filter: (combined_views."Proces.Bieżący.Identyfikator" = '96732'::bigint)
  • Rows Removed by Filter: 320,776
180. 199.106 3,957.982 ↓ 1.5 320,777 1

Unique (cost=525,705.00..535,772.48 rows=211,947 width=1,838) (actual time=3,604.923..3,957.982 rows=320,777 loops=1)

181. 512.710 3,758.876 ↓ 1.5 320,777 1

Sort (cost=525,705.00..526,234.87 rows=211,947 width=1,838) (actual time=3,604.922..3,758.876 rows=320,777 loops=1)

  • Sort Key: wf_indexed.id, ((((ek.ksiega_numer)::text || '/'::text) || (ek.ksiega_rok)::text)), pb_instancja."Proces.Bieżący.Sprawa.Znak", pb_instancja."Proces.Bieżący.Identyfikator", pb_instancja."Proces.Bieżący.Nazwa procesu", pb_instancja."Proces.Bieżący.Identyfikator procesu", pb_instancja."Proces.Bieżący.Status.Systemowy", pb_instancja."Proces.Bieżący.Krok", sa_4.full_name, sa_4.address, (replace(sa_4.esp, 'MADKOM:'::text, 'SIDAS CU:'::text)), sa_4.email, pb_merytoryczne."Proces.Bieżący.Merytoryczne.Stanowisko", (CASE WHEN ((COALESCE(efd_5.form_dane_wartosc, ''::text) <> ''::text) AND (efd_5.form_dane_wartosc <> ''::text)) THEN (efd_5.form_dane_wartosc)::timestamp(0) without time zone ELSE (wi_15.create_date)::timestamp(0) without time zone END), (CASE WHEN (ek_1.sprawa_uid IS NOT NULL) THEN true ELSE false END), (CASE WHEN (info_decree_command.sprawa_uid IS NOT NULL) THEN (json_build_object('id', wi_11.id, 'isDecreeCommand', true))::jsonb ELSE (json_build_object('id', wi_11.id, 'isDecreeCommand', false))::jsonb END), (CASE WHEN (wis.instance_id IS NOT NULL) THEN true ELSE false END), (CASE WHEN (info_priority.sprawa_uid IS NOT NULL) THEN (info_priority.case_priority)::integer ELSE 2 END)
  • Sort Method: external merge Disk: 82,104kB
182. 29.019 3,246.166 ↓ 1.5 320,777 1

Append (cost=26,007.60..169,365.74 rows=211,947 width=1,838) (actual time=253.757..3,246.166 rows=320,777 loops=1)

183. 0.014 253.879 ↑ 25,781.0 2 1

Merge Right Join (cost=26,007.60..35,306.20 rows=51,562 width=344) (actual time=253.756..253.879 rows=2 loops=1)

  • Merge Cond: (wi_11.id = wf_indexed.id)
184. 0.011 14.101 ↑ 250.0 2 1

Nested Loop Left Join (cost=795.61..8,039.48 rows=500 width=46) (actual time=14.016..14.101 rows=2 loops=1)

185. 0.120 14.060 ↑ 250.0 2 1

Nested Loop Left Join (cost=795.19..4,442.48 rows=500 width=42) (actual time=13.993..14.060 rows=2 loops=1)

186. 0.004 13.856 ↑ 250.0 2 1

Merge Left Join (cost=794.76..797.48 rows=500 width=10) (actual time=13.853..13.856 rows=2 loops=1)

  • Merge Cond: (wi_11.id = wi_12.id)
187. 0.031 13.709 ↑ 250.0 2 1

Sort (cost=696.83..698.08 rows=500 width=10) (actual time=13.708..13.709 rows=2 loops=1)

  • Sort Key: wi_11.id
  • Sort Method: quicksort Memory: 25kB
188. 0.046 13.678 ↑ 250.0 2 1

Hash Left Join (cost=620.05..674.42 rows=500 width=10) (actual time=13.207..13.678 rows=2 loops=1)

  • Hash Cond: (wi_11.id = wis.instance_id)
189. 0.070 12.076 ↑ 250.0 2 1

Hash Left Join (cost=525.00..572.50 rows=500 width=9) (actual time=11.608..12.076 rows=2 loops=1)

  • Hash Cond: (((wi_11.id)::character varying)::text = (ek_1.sprawa_uid)::text)
190. 0.117 0.709 ↑ 250.0 2 1

Hash Right Join (cost=26.25..65.62 rows=500 width=8) (actual time=0.246..0.709 rows=2 loops=1)

  • Hash Cond: (users_usergroups_1.group_id = wi_11.workstation_id)
191. 0.534 0.534 ↓ 1.9 444 1

Seq Scan on users_usergroups users_usergroups_1 (cost=0.00..22.05 rows=228 width=8) (actual time=0.022..0.534 rows=444 loops=1)

  • Filter: (((status)::text = 'A'::text) AND ((typ)::text = 'Z'::text))
  • Rows Removed by Filter: 559
192. 0.032 0.058 ↑ 250.0 2 1

Hash (cost=20.00..20.00 rows=500 width=16) (actual time=0.058..0.058 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
193. 0.026 0.026 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_11 (cost=0.00..20.00 rows=500 width=16) (actual time=0.022..0.026 rows=2 loops=1)

  • Filter: (NOT deleted)
194. 0.001 11.297 ↓ 0.0 0 1

Hash (cost=482.28..482.28 rows=1,318 width=6) (actual time=11.297..11.297 rows=0 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 16kB
195. 0.008 11.296 ↓ 0.0 0 1

HashAggregate (cost=455.92..469.10 rows=1,318 width=6) (actual time=11.296..11.296 rows=0 loops=1)

  • Group Key: ek_1.sprawa_uid
196. 0.823 11.288 ↓ 0.0 0 1

Hash Join (cost=27.43..452.62 rows=1,318 width=6) (actual time=11.288..11.288 rows=0 loops=1)

  • Hash Cond: ((ek_1.sprawa_uid)::text = ((wf_instance_indexed.id)::character varying)::text)
197. 10.384 10.384 ↓ 1.0 2,735 1

Index Scan using eurzad_komentarz_i1 on eurzad_komentarz ek_1 (cost=0.42..409.11 rows=2,637 width=6) (actual time=0.107..10.384 rows=2,735 loops=1)

  • Index Cond: (komentarz_typ = 0)
  • Filter: ((komentarz_typ_dostepu <> 0) AND (user_id > 1))
  • Rows Removed by Filter: 84
198. 0.021 0.081 ↑ 100.0 2 1

Hash (cost=24.50..24.50 rows=200 width=8) (actual time=0.081..0.081 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
199. 0.015 0.060 ↑ 100.0 2 1

HashAggregate (cost=22.50..24.50 rows=200 width=8) (actual time=0.057..0.060 rows=2 loops=1)

  • Group Key: ((wf_instance_indexed.id)::character varying)::text
200. 0.045 0.045 ↑ 500.0 2 1

Seq Scan on wf_instance_indexed (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.042..0.045 rows=2 loops=1)

201. 0.258 1.556 ↑ 1.0 608 1

Hash (cost=87.22..87.22 rows=626 width=8) (actual time=1.556..1.556 rows=608 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 32kB
202. 0.834 1.298 ↑ 1.0 608 1

HashAggregate (cost=74.70..80.96 rows=626 width=8) (actual time=1.079..1.298 rows=608 loops=1)

  • Group Key: wis.instance_id
203. 0.464 0.464 ↑ 1.0 772 1

Seq Scan on wf_instance_sharing_permissions wis (cost=0.00..72.76 rows=776 width=8) (actual time=0.018..0.464 rows=772 loops=1)

204. 0.016 0.143 ↓ 0.0 0 1

Materialize (cost=97.93..98.03 rows=3 width=8) (actual time=0.143..0.143 rows=0 loops=1)

205. 0.001 0.127 ↓ 0.0 0 1

Unique (cost=97.93..98.00 rows=3 width=17) (actual time=0.127..0.127 rows=0 loops=1)

206. 0.002 0.126 ↓ 0.0 0 1

GroupAggregate (cost=97.93..97.99 rows=3 width=17) (actual time=0.126..0.126 rows=0 loops=1)

  • Group Key: wi_12.id, wih.users_usergroups_id_to
  • Filter: (count(wih.users_usergroups_id_to) > 1)
207. 0.024 0.124 ↓ 0.0 0 1

Sort (cost=97.93..97.94 rows=3 width=16) (actual time=0.124..0.124 rows=0 loops=1)

  • Sort Key: wi_12.id, wih.users_usergroups_id_to
  • Sort Method: quicksort Memory: 25kB
208. 0.001 0.100 ↓ 0.0 0 1

Nested Loop (cost=64.43..97.90 rows=3 width=16) (actual time=0.100..0.100 rows=0 loops=1)

209. 0.036 0.099 ↓ 0.0 0 1

Hash Join (cost=64.28..88.43 rows=42 width=24) (actual time=0.099..0.099 rows=0 loops=1)

  • Hash Cond: (wi_12.id = wih.instance_id)
210. 0.015 0.015 ↑ 1,000.0 1 1

Seq Scan on wf_instance_indexed wi_12 (cost=0.00..20.00 rows=1,000 width=16) (actual time=0.015..0.015 rows=1 loops=1)

211. 0.001 0.048 ↓ 0.0 0 1

Hash (cost=64.18..64.18 rows=8 width=16) (actual time=0.048..0.048 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
212. 0.028 0.047 ↓ 0.0 0 1

Hash Join (cost=26.20..64.18 rows=8 width=16) (actual time=0.047..0.047 rows=0 loops=1)

  • Hash Cond: (pt.id = wih.transition_id)
213. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=13.72..51.42 rows=56 width=4) (never executed)

  • Hash Cond: (pt.activity_to_id = pa2.id)
214. 0.000 0.000 ↓ 0.0 0

Seq Scan on pe_transition pt (cost=0.00..34.37 rows=737 width=12) (never executed)

215. 0.000 0.000 ↓ 0.0 0

Hash (cost=13.46..13.46 rows=21 width=4) (never executed)

216. 0.000 0.000 ↓ 0.0 0

Seq Scan on pe_activity pa2 (cost=0.00..13.46 rows=21 width=4) (never executed)

  • Filter: ((status)::text = 'DECREE'::text)
217. 0.001 0.019 ↓ 0.0 0 1

Hash (cost=11.10..11.10 rows=110 width=24) (actual time=0.019..0.019 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
218. 0.018 0.018 ↑ 55.0 2 1

Seq Scan on wf_instance_history_indexed wih (cost=0.00..11.10 rows=110 width=24) (actual time=0.016..0.018 rows=2 loops=1)

219. 0.000 0.000 ↓ 0.0 0

Index Scan using pe_activity_pkey on pe_activity pa_1 (cost=0.15..0.22 rows=1 width=4) (never executed)

  • Index Cond: (id = wi_12.activity_id)
  • Filter: ((status)::text = 'DECREE'::text)
220. 0.084 0.084 ↓ 0.0 0 2

Index Scan using eurzad_sprawa_przedluzanie_pk on eurzad_sprawa_przedluzanie info_decree_command (cost=0.42..7.28 rows=1 width=4) (actual time=0.042..0.042 rows=0 loops=2)

  • Index Cond: (sprawa_uid = wi_11.id)
  • Filter: ((dekret_createdate IS NOT NULL) AND (dekret_finish_uugid IS NULL))
221. 0.030 0.030 ↑ 1.0 1 2

Index Scan using eurzad_sprawa_pkey on eurzad_sprawa info_priority (cost=0.42..7.18 rows=1 width=6) (actual time=0.012..0.015 rows=1 loops=2)

  • Index Cond: (sprawa_uid = wi_11.id)
222. 0.022 239.764 ↑ 10,312.5 2 1

Materialize (cost=25,211.99..25,770.17 rows=20,625 width=282) (actual time=239.731..239.764 rows=2 loops=1)

223. 0.010 239.742 ↑ 10,312.5 2 1

Merge Left Join (cost=25,211.99..25,718.61 rows=20,625 width=282) (actual time=239.712..239.742 rows=2 loops=1)

  • Merge Cond: (wf_indexed.id = wi_15.id)
224. 0.007 239.551 ↑ 3,125.0 2 1

Merge Left Join (cost=20,939.73..21,106.50 rows=6,250 width=274) (actual time=239.537..239.551 rows=2 loops=1)

  • Merge Cond: (wf_indexed.id = pb_instancja.id)
225. 0.004 7.125 ↑ 1,250.0 2 1

Merge Left Join (cost=8,395.05..8,461.82 rows=2,500 width=155) (actual time=7.115..7.125 rows=2 loops=1)

  • Merge Cond: (wf_indexed.id = wi_10.id)
226. 0.007 6.990 ↑ 500.0 2 1

Merge Left Join (cost=4,929.19..4,955.96 rows=1,000 width=147) (actual time=6.982..6.990 rows=2 loops=1)

  • Merge Cond: (wf_indexed.id = pb_merytoryczne.id)
227. 0.003 0.142 ↑ 500.0 2 1

Merge Left Join (cost=4,868.89..4,893.00 rows=1,000 width=115) (actual time=0.140..0.142 rows=2 loops=1)

  • Merge Cond: (wf_indexed.id = wf.id)
228. 0.035 0.052 ↑ 500.0 2 1

Sort (cost=69.83..72.33 rows=1,000 width=8) (actual time=0.050..0.052 rows=2 loops=1)

  • Sort Key: wf_indexed.id
  • Sort Method: quicksort Memory: 25kB
229. 0.017 0.017 ↑ 500.0 2 1

Seq Scan on wf_instance_indexed wf_indexed (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.015..0.017 rows=2 loops=1)

230. 0.010 0.087 ↓ 0.0 0 1

Materialize (cost=4,799.06..4,804.11 rows=194 width=115) (actual time=0.087..0.087 rows=0 loops=1)

231. 0.001 0.077 ↓ 0.0 0 1

Unique (cost=4,799.06..4,801.68 rows=194 width=947) (actual time=0.077..0.077 rows=0 loops=1)

232. 0.019 0.076 ↓ 0.0 0 1

Sort (cost=4,799.06..4,800.37 rows=525 width=947) (actual time=0.076..0.076 rows=0 loops=1)

  • Sort Key: wf.id
  • Sort Method: quicksort Memory: 25kB
233. 0.001 0.057 ↓ 0.0 0 1

Nested Loop (cost=1.27..4,775.34 rows=525 width=947) (actual time=0.057..0.057 rows=0 loops=1)

234. 0.000 0.056 ↓ 0.0 0 1

Nested Loop (cost=0.85..4,477.53 rows=525 width=40) (actual time=0.056..0.056 rows=0 loops=1)

235. 0.005 0.056 ↓ 0.0 0 1

Nested Loop (cost=0.43..4,210.00 rows=525 width=26) (actual time=0.056..0.056 rows=0 loops=1)

236. 0.015 0.015 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wf (cost=0.00..20.00 rows=500 width=8) (actual time=0.013..0.015 rows=2 loops=1)

  • Filter: (NOT deleted)
237. 0.036 0.036 ↓ 0.0 0 2

Index Scan using eurzad_form_dane_i4 on eurzad_form_dane efd_4 (cost=0.43..8.37 rows=1 width=22) (actual time=0.018..0.018 rows=0 loops=2)

  • Index Cond: ((sprawa_uid = wf.id) AND ((form_dane_pole)::text = 'petent_uid'::text))
238. 0.000 0.000 ↓ 0.0 0

Index Only Scan using eurzad_petent_dane_pk on eurzad_petent_dane epd (cost=0.42..0.50 rows=1 width=14) (never executed)

  • Index Cond: (petent_uid = efd_4.form_dane_wartosc)
  • Heap Fetches: 0
239. 0.000 0.000 ↓ 0.0 0

Index Scan using suppliant_address_petent_uid_idx on suppliant_address sa_4 (cost=0.42..0.55 rows=1 width=102) (never executed)

  • Index Cond: ((petent_uid)::text = efd_4.form_dane_wartosc)
240. 0.047 6.841 ↑ 1.0 2 1

Sort (cost=60.31..60.31 rows=2 width=40) (actual time=6.838..6.841 rows=2 loops=1)

  • Sort Key: pb_merytoryczne.id
  • Sort Method: quicksort Memory: 25kB
241. 0.004 6.794 ↑ 1.0 2 1

Subquery Scan on pb_merytoryczne (cost=30.94..60.30 rows=2 width=40) (actual time=6.542..6.794 rows=2 loops=1)

242. 6.308 6.790 ↑ 1.0 2 1

Nested Loop Left Join (cost=30.94..60.28 rows=2 width=2,068) (actual time=6.540..6.790 rows=2 loops=1)

243.          

CTE instance_history

244. 0.015 0.027 ↑ 55.0 2 1

HashAggregate (cost=11.65..12.75 rows=110 width=16) (actual time=0.025..0.027 rows=2 loops=1)

  • Group Key: wih2.instance_id
245. 0.012 0.012 ↑ 55.0 2 1

Seq Scan on wf_instance_history_indexed wih2 (cost=0.00..11.10 rows=110 width=16) (actual time=0.011..0.012 rows=2 loops=1)

246. 0.007 0.438 ↑ 1.0 2 1

Nested Loop Left Join (cost=17.91..42.52 rows=2 width=63) (actual time=0.365..0.438 rows=2 loops=1)

247. 0.057 0.323 ↑ 1.0 2 1

Hash Join (cost=17.63..39.52 rows=2 width=63) (actual time=0.313..0.323 rows=2 loops=1)

  • Hash Cond: (wi_13.id = wih_1.instance_id)
248. 0.019 0.019 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_13 (cost=0.00..20.00 rows=500 width=8) (actual time=0.014..0.019 rows=2 loops=1)

  • Filter: (NOT deleted)
249. 0.023 0.247 ↓ 2.0 2 1

Hash (cost=17.61..17.61 rows=1 width=71) (actual time=0.247..0.247 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
250. 0.007 0.224 ↓ 2.0 2 1

Nested Loop (cost=4.95..17.61 rows=1 width=71) (actual time=0.177..0.224 rows=2 loops=1)

251. 0.008 0.189 ↓ 2.0 2 1

Nested Loop (cost=4.68..17.26 rows=1 width=45) (actual time=0.153..0.189 rows=2 loops=1)

252. 0.004 0.171 ↓ 2.0 2 1

Nested Loop (cost=4.40..16.87 rows=1 width=27) (actual time=0.142..0.171 rows=2 loops=1)

253. 0.008 0.137 ↓ 2.0 2 1

Nested Loop (cost=4.12..16.52 rows=1 width=24) (actual time=0.116..0.137 rows=2 loops=1)

254. 0.041 0.103 ↓ 2.0 2 1

Hash Join (cost=3.85..15.79 rows=1 width=24) (actual time=0.096..0.103 rows=2 loops=1)

  • Hash Cond: ((wih_1.instance_id = ih.instance_id) AND (wih_1.position_order = ih.position_order))
255. 0.014 0.014 ↑ 55.0 2 1

Seq Scan on wf_instance_history_indexed wih_1 (cost=0.00..11.10 rows=110 width=24) (actual time=0.013..0.014 rows=2 loops=1)

256. 0.013 0.048 ↑ 55.0 2 1

Hash (cost=2.20..2.20 rows=110 width=16) (actual time=0.048..0.048 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
257. 0.035 0.035 ↑ 55.0 2 1

CTE Scan on instance_history ih (cost=0.00..2.20 rows=110 width=16) (actual time=0.029..0.035 rows=2 loops=1)

258. 0.026 0.026 ↑ 1.0 1 2

Index Scan using users_usergroups_pkey on users_usergroups uug_4 (cost=0.28..0.73 rows=1 width=12) (actual time=0.013..0.013 rows=1 loops=2)

  • Index Cond: (id = wih_1.users_usergroups_id_to)
259. 0.030 0.030 ↑ 1.0 1 2

Index Scan using users_groups_pkey on users_groups ug_4 (cost=0.28..0.34 rows=1 width=15) (actual time=0.014..0.015 rows=1 loops=2)

  • Index Cond: (group_id = uug_4.group_id)
260. 0.010 0.010 ↑ 1.0 1 2

Index Scan using users_groups_pkey on users_groups p_ug (cost=0.28..0.38 rows=1 width=26) (actual time=0.005..0.005 rows=1 loops=2)

  • Index Cond: (group_id = ug_4.parent_group_id)
261. 0.028 0.028 ↑ 1.0 1 2

Index Scan using users_users_pkey on users_users uu_4 (cost=0.27..0.35 rows=1 width=30) (actual time=0.013..0.014 rows=1 loops=2)

  • Index Cond: ("userId" = uug_4."userId")
262. 0.108 0.108 ↓ 0.0 0 2

Index Scan using user_preferences_user on users_user_preferences uup_s (cost=0.28..1.49 rows=1 width=4) (actual time=0.054..0.054 rows=0 loops=2)

  • Index Cond: (user_id = uu_4."userId")
  • Filter: (("prefName")::text = 'symbol_uzytkownika'::text)
  • Rows Removed by Filter: 34
263. 0.044 0.044 ↓ 0.0 0 2

Index Scan using user_preferences_user on users_user_preferences uup_p (cost=0.28..1.49 rows=1 width=4) (actual time=0.022..0.022 rows=0 loops=2)

  • Index Cond: (user_id = uu_4."userId")
  • Filter: (("prefName")::text = 'cellphone'::text)
  • Rows Removed by Filter: 34
264. 0.019 0.131 ↓ 0.0 0 1

Sort (cost=3,465.86..3,467.11 rows=500 width=16) (actual time=0.131..0.131 rows=0 loops=1)

  • Sort Key: wi_10.id
  • Sort Method: quicksort Memory: 25kB
265. 0.001 0.112 ↓ 0.0 0 1

Nested Loop (cost=0.84..3,443.45 rows=500 width=16) (actual time=0.112..0.112 rows=0 loops=1)

266. 0.007 0.111 ↓ 0.0 0 1

Nested Loop (cost=0.42..3,195.75 rows=500 width=22) (actual time=0.111..0.111 rows=0 loops=1)

267. 0.064 0.064 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_10 (cost=0.00..20.00 rows=500 width=8) (actual time=0.062..0.064 rows=2 loops=1)

  • Filter: (NOT deleted)
268. 0.040 0.040 ↓ 0.0 0 2

Index Scan using ksiega_sprawa_sprawa_uid on eurzad_ksiega_sprawa eks (cost=0.42..6.34 rows=1 width=18) (actual time=0.020..0.020 rows=0 loops=2)

  • Index Cond: (sprawa_uid = wi_10.id)
269. 0.000 0.000 ↓ 0.0 0

Index Scan using eurzad_ksiega_ksiega_uid on eurzad_ksiega ek (cost=0.42..0.49 rows=1 width=22) (never executed)

  • Index Cond: ((ksiega_uid)::text = (eks.ksiega_uid)::text)
270. 0.027 232.419 ↑ 250.0 2 1

Sort (cost=12,544.68..12,545.93 rows=500 width=127) (actual time=232.418..232.419 rows=2 loops=1)

  • Sort Key: pb_instancja.id
  • Sort Method: quicksort Memory: 25kB
271. 0.002 232.392 ↑ 250.0 2 1

Subquery Scan on pb_instancja (cost=6,285.57..12,522.26 rows=500 width=127) (actual time=232.351..232.392 rows=2 loops=1)

272. 0.023 232.390 ↑ 250.0 2 1

Hash Left Join (cost=6,285.57..12,517.26 rows=500 width=2,691) (actual time=232.350..232.390 rows=2 loops=1)

  • Hash Cond: ((a.status)::text = activity_status.status)
273.          

CTE case_priorities

274. 0.007 0.007 ↑ 1.0 3 1

Values Scan on "*VALUES*" (cost=0.00..0.04 rows=3 width=36) (actual time=0.005..0.007 rows=3 loops=1)

275.          

CTE activity_status

276. 0.012 0.012 ↑ 1.0 16 1

Values Scan on "*VALUES*_1" (cost=0.00..0.20 rows=16 width=64) (actual time=0.002..0.012 rows=16 loops=1)

277. 0.105 232.318 ↑ 250.0 2 1

Hash Left Join (cost=6,284.81..12,509.63 rows=500 width=96) (actual time=232.281..232.318 rows=2 loops=1)

  • Hash Cond: (es.case_priority = case_priorities.weight)
278. 0.003 232.192 ↑ 250.0 2 1

Nested Loop Left Join (cost=6,284.72..12,502.66 rows=500 width=98) (actual time=232.157..232.192 rows=2 loops=1)

279. 0.014 232.173 ↑ 250.0 2 1

Nested Loop Left Join (cost=6,284.43..10,187.91 rows=500 width=77) (actual time=232.144..232.173 rows=2 loops=1)

280. 0.027 232.101 ↑ 250.0 2 1

Hash Join (cost=6,284.00..6,590.91 rows=500 width=75) (actual time=232.092..232.101 rows=2 loops=1)

  • Hash Cond: (wi_14.activity_id = a.id)
281. 10.505 231.398 ↑ 250.0 2 1

Merge Left Join (cost=6,262.31..6,562.34 rows=500 width=16) (actual time=231.392..231.398 rows=2 loops=1)

  • Merge Cond: ((((wi_14.id)::character varying)::text) = (foe.uid_sprawy)::text)
282. 0.044 0.066 ↑ 250.0 2 1

Sort (cost=42.41..43.66 rows=500 width=16) (actual time=0.064..0.066 rows=2 loops=1)

  • Sort Key: (((wi_14.id)::character varying)::text)
  • Sort Method: quicksort Memory: 25kB
283. 0.022 0.022 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_14 (cost=0.00..20.00 rows=500 width=16) (actual time=0.020..0.022 rows=2 loops=1)

  • Filter: (NOT deleted)
284. 153.811 220.827 ↑ 1.0 28,063 1

Sort (cost=6,219.90..6,292.44 rows=29,017 width=4) (actual time=216.065..220.827 rows=28,063 loops=1)

  • Sort Key: foe.uid_sprawy
  • Sort Method: quicksort Memory: 2,131kB
285. 67.016 67.016 ↓ 1.0 29,073 1

Seq Scan on front_office_eform foe (cost=0.00..4,069.07 rows=29,017 width=4) (actual time=0.022..67.016 rows=29,073 loops=1)

  • Filter: (((eform_name)::text <> ALL ('{UPP,UPD,EPO}'::text[])) OR (eform_name IS NULL))
  • Rows Removed by Filter: 60,241
286. 0.236 0.676 ↑ 1.0 277 1

Hash (cost=18.23..18.23 rows=277 width=71) (actual time=0.676..0.676 rows=277 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 36kB
287. 0.268 0.440 ↑ 1.0 277 1

Hash Join (cost=1.65..18.23 rows=277 width=71) (actual time=0.106..0.440 rows=277 loops=1)

  • Hash Cond: (a.process_id = p.id)
288. 0.109 0.109 ↑ 1.0 277 1

Seq Scan on pe_activity a (cost=0.00..12.77 rows=277 width=45) (actual time=0.016..0.109 rows=277 loops=1)

289. 0.040 0.063 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=34) (actual time=0.063..0.063 rows=29 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
290. 0.023 0.023 ↑ 1.0 29 1

Seq Scan on pe_process p (cost=0.00..1.29 rows=29 width=34) (actual time=0.012..0.023 rows=29 loops=1)

291. 0.058 0.058 ↑ 1.0 1 2

Index Scan using eurzad_sprawa_pkey on eurzad_sprawa es (cost=0.42..7.18 rows=1 width=6) (actual time=0.027..0.029 rows=1 loops=2)

  • Index Cond: (sprawa_uid = wi_14.id)
292. 0.016 0.016 ↓ 0.0 0 2

Index Scan using eurzad_t_sprawa_uid on eurzad_teczka et_4 (cost=0.29..4.62 rows=1 width=25) (actual time=0.008..0.008 rows=0 loops=2)

  • Index Cond: (sprawa_uid = wi_14.id)
293. 0.005 0.021 ↑ 1.0 3 1

Hash (cost=0.06..0.06 rows=3 width=4) (actual time=0.021..0.021 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
294. 0.016 0.016 ↑ 1.0 3 1

CTE Scan on case_priorities (cost=0.00..0.06 rows=3 width=4) (actual time=0.012..0.016 rows=3 loops=1)

295. 0.010 0.049 ↑ 1.0 16 1

Hash (cost=0.32..0.32 rows=16 width=64) (actual time=0.049..0.049 rows=16 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
296. 0.039 0.039 ↑ 1.0 16 1

CTE Scan on activity_status (cost=0.00..0.32 rows=16 width=64) (actual time=0.005..0.039 rows=16 loops=1)

297. 0.004 0.181 ↑ 330.0 2 1

Materialize (cost=4,272.26..4,288.76 rows=660 width=16) (actual time=0.168..0.181 rows=2 loops=1)

298. 0.011 0.177 ↑ 330.0 2 1

Unique (cost=4,272.26..4,280.51 rows=660 width=28) (actual time=0.165..0.177 rows=2 loops=1)

299. 0.088 0.166 ↑ 330.0 2 1

Sort (cost=4,272.26..4,273.91 rows=660 width=28) (actual time=0.164..0.166 rows=2 loops=1)

  • Sort Key: wi_15.id, (CASE WHEN ((COALESCE(efd_5.form_dane_wartosc, ''::text) <> ''::text) AND (efd_5.form_dane_wartosc <> ''::text)) THEN ((efd_5.form_dane_wartosc)::timestamp without time zone)::time(0) without time zone ELSE (wi_15.create_date)::time(0) without time zone END), (CASE WHEN ((COALESCE(efd_5.form_dane_wartosc, ''::text) <> ''::text) AND (efd_5.form_dane_wartosc <> ''::text)) THEN (efd_5.form_dane_wartosc)::date ELSE (wi_15.create_date)::date END), (CASE WHEN ((COALESCE(efd_5.form_dane_wartosc, ''::text) <> ''::text) AND (efd_5.form_dane_wartosc <> ''::text)) THEN (efd_5.form_dane_wartosc)::timestamp(0) without time zone ELSE (wi_15.create_date)::timestamp(0) without time zone END)
  • Sort Method: quicksort Memory: 25kB
300. 0.030 0.078 ↑ 330.0 2 1

Nested Loop Left Join (cost=0.43..4,241.35 rows=660 width=28) (actual time=0.067..0.078 rows=2 loops=1)

301. 0.028 0.028 ↑ 250.0 2 1

Seq Scan on wf_instance_indexed wi_15 (cost=0.00..20.00 rows=500 width=16) (actual time=0.025..0.028 rows=2 loops=1)

  • Filter: (NOT deleted)
302. 0.020 0.020 ↓ 0.0 0 2

Index Scan using eurzad_form_dane_i4 on eurzad_form_dane efd_5 (cost=0.43..8.37 rows=1 width=22) (actual time=0.010..0.010 rows=0 loops=2)

  • Index Cond: ((sprawa_uid = wi_15.id) AND ((form_dane_pole)::text = 'data'::text))
303. 67.294 2,963.268 ↓ 2.0 320,775 1

Subquery Scan on *SELECT* 2_4 (cost=84,306.77..133,543.93 rows=160,385 width=302) (actual time=1,723.731..2,963.268 rows=320,775 loops=1)

304. 417.305 2,895.974 ↓ 2.0 320,775 1

Hash Left Join (cost=84,306.77..131,138.15 rows=160,385 width=294) (actual time=1,723.727..2,895.974 rows=320,775 loops=1)

  • Hash Cond: (wf_1.id = pb_instancja_mv.id)
305. 328.166 2,258.952 ↓ 2.0 320,775 1

Hash Left Join (cost=67,561.87..99,012.61 rows=160,385 width=197) (actual time=1,503.473..2,258.952 rows=320,775 loops=1)

  • Hash Cond: (wf_1.id = pb_metryka_podmioty_wiodacy_mv.id)
306. 330.221 1,764.136 ↓ 2.0 320,775 1

Hash Right Join (cost=53,983.44..75,448.19 rows=160,385 width=119) (actual time=1,336.511..1,764.136 rows=320,775 loops=1)

  • Hash Cond: (pb_merytoryczne_mv.id = wf_1.id)
307. 99.109 99.109 ↑ 1.0 291,240 1

Seq Scan on proces_biezacy_merytoryczne_mv pb_merytoryczne_mv (cost=0.00..11,759.40 rows=291,240 width=45) (actual time=0.036..99.109 rows=291,240 loops=1)

308. 113.847 1,334.806 ↓ 2.0 320,775 1

Hash (cost=49,941.63..49,941.63 rows=160,385 width=78) (actual time=1,334.806..1,334.806 rows=320,775 loops=1)

  • Buckets: 131,072 (originally 131072) Batches: 8 (originally 4) Memory Usage: 6,841kB
309. 258.478 1,220.959 ↓ 2.0 320,775 1

Hash Right Join (cost=33,972.88..49,941.63 rows=160,385 width=78) (actual time=901.915..1,220.959 rows=320,775 loops=1)

  • Hash Cond: (pb_informacja_mv.id = wf_1.id)
310. 62.194 62.194 ↑ 1.0 291,240 1

Seq Scan on proces_biezacy_informacja_mv pb_informacja_mv (cost=0.00..6,222.40 rows=291,240 width=60) (actual time=0.038..62.194 rows=291,240 loops=1)

311. 85.235 900.287 ↓ 2.0 320,775 1

Hash (cost=31,028.07..31,028.07 rows=160,385 width=22) (actual time=900.287..900.287 rows=320,775 loops=1)

  • Buckets: 131,072 (originally 131072) Batches: 4 (originally 2) Memory Usage: 6,841kB
312. 150.555 815.052 ↓ 2.0 320,775 1

Hash Left Join (cost=16,061.16..31,028.07 rows=160,385 width=22) (actual time=444.377..815.052 rows=320,775 loops=1)

  • Hash Cond: (wf_1.id = pb_rpp_mv.id)
313. 176.240 564.931 ↓ 2.0 320,775 1

Hash Right Join (cost=10,349.94..21,425.69 rows=160,385 width=12) (actual time=341.719..564.931 rows=320,775 loops=1)

  • Hash Cond: (pb_wszczecie_mv.id = wf_1.id)
314. 50.053 50.053 ↑ 1.0 291,240 1

Seq Scan on proces_biezacy_wszczecie_mv pb_wszczecie_mv (cost=0.00..5,054.40 rows=291,240 width=12) (actual time=0.026..50.053 rows=291,240 loops=1)

315. 151.712 338.638 ↓ 2.0 320,775 1

Hash (cost=7,718.12..7,718.12 rows=160,385 width=4) (actual time=338.638..338.638 rows=320,775 loops=1)

  • Buckets: 262,144 Batches: 2 Memory Usage: 7,679kB
316. 186.912 186.926 ↓ 2.0 320,775 1

Seq Scan on wf_instance wf_1 (cost=22.50..7,718.12 rows=160,385 width=4) (actual time=0.130..186.926 rows=320,775 loops=1)

  • Filter: (NOT (hashed SubPlan 2))
  • Rows Removed by Filter: 2
317.          

SubPlan (for Seq Scan)

318. 0.014 0.014 ↑ 500.0 2 1

Seq Scan on wf_instance_indexed wf_instance_indexed_1 (cost=0.00..20.00 rows=1,000 width=8) (actual time=0.013..0.014 rows=2 loops=1)

319. 61.475 99.566 ↑ 1.0 174,143 1

Hash (cost=2,683.43..2,683.43 rows=174,143 width=14) (actual time=99.566..99.566 rows=174,143 loops=1)

  • Buckets: 262,144 Batches: 2 Memory Usage: 6,124kB
320. 38.091 38.091 ↑ 1.0 174,143 1

Seq Scan on proces_biezacy_rpp_mv pb_rpp_mv (cost=0.00..2,683.43 rows=174,143 width=14) (actual time=0.030..38.091 rows=174,143 loops=1)

321. 81.313 166.650 ↑ 1.0 200,508 1

Hash (cost=8,330.08..8,330.08 rows=200,508 width=82) (actual time=166.650..166.650 rows=200,508 loops=1)

  • Buckets: 65,536 Batches: 4 Memory Usage: 6,164kB
322. 85.337 85.337 ↑ 1.0 200,508 1

Seq Scan on proces_biezacy_metryka_podmioty_wiodacy_mv pb_metryka_podmioty_wiodacy_mv (cost=0.00..8,330.08 rows=200,508 width=82) (actual time=0.014..85.337 rows=200,508 loops=1)

323. 119.583 219.717 ↑ 1.0 291,240 1

Hash (cost=8,553.40..8,553.40 rows=291,240 width=101) (actual time=219.717..219.717 rows=291,240 loops=1)

  • Buckets: 65,536 Batches: 8 Memory Usage: 4,705kB
324. 100.134 100.134 ↑ 1.0 291,240 1

Seq Scan on proces_biezacy_instancja_mv pb_instancja_mv (cost=0.00..8,553.40 rows=291,240 width=101) (actual time=0.023..100.134 rows=291,240 loops=1)

325. 0.044 0.044 ↑ 1.0 1 1

Index Scan using pe_instance_pkey on wf_instance (cost=0.42..6.75 rows=1 width=4) (actual time=0.043..0.044 rows=1 loops=1)

  • Index Cond: (id = combined_views.id)
  • Filter: (NOT deleted)
326. 0.013 0.134 ↓ 0.0 0 1

Sort (cost=88.89..88.91 rows=9 width=36) (actual time=0.134..0.134 rows=0 loops=1)

  • Sort Key: wi.id
  • Sort Method: quicksort Memory: 25kB
327. 0.007 0.121 ↓ 0.0 0 1

Nested Loop (cost=1.84..88.75 rows=9 width=36) (actual time=0.121..0.121 rows=0 loops=1)

328. 0.005 0.094 ↓ 1.1 10 1

Nested Loop (cost=1.55..85.72 rows=9 width=12) (actual time=0.057..0.094 rows=10 loops=1)

329. 0.027 0.049 ↑ 1.0 10 1

HashAggregate (cost=1.12..1.23 rows=10 width=8) (actual time=0.045..0.049 rows=10 loops=1)

  • Group Key: test5f6c74b5ad0ebbea56e8daf652e32c381525fc3230093.instance_id
330. 0.022 0.022 ↑ 1.0 10 1

Seq Scan on test5f6c74b5ad0ebbea56e8daf652e32c381525fc3230093 (cost=0.00..1.10 rows=10 width=8) (actual time=0.020..0.022 rows=10 loops=1)

331. 0.040 0.040 ↑ 1.0 1 10

Index Scan using pe_instance_pkey on wf_instance wi (cost=0.42..8.44 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=10)

  • Index Cond: (id = test5f6c74b5ad0ebbea56e8daf652e32c381525fc3230093.instance_id)
  • Filter: (NOT deleted)
332. 0.020 0.020 ↓ 0.0 0 10

Index Scan using eurzad_t_sprawa_uid on eurzad_teczka et (cost=0.29..0.33 rows=1 width=36) (actual time=0.002..0.002 rows=0 loops=10)

  • Index Cond: (sprawa_uid = wi.id)
333. 0.032 0.032 ↑ 1.0 1 1

Index Scan using pe_instance_pkey on wf_instance wi_1 (cost=0.42..0.51 rows=1 width=4) (actual time=0.032..0.032 rows=1 loops=1)

  • Index Cond: (wf_instance.id = id)
  • Filter: (NOT deleted)
334. 0.018 0.018 ↓ 0.0 0 1

Index Only Scan using eurzad_t_sprawa_uid on eurzad_teczka et_1 (cost=0.29..0.31 rows=1 width=4) (actual time=0.018..0.018 rows=0 loops=1)

  • Index Cond: (sprawa_uid = wi_1.id)
  • Heap Fetches: 0
335. 0.000 13.553 ↓ 0.0 0 1

Hash (cost=4,038.87..4,038.87 rows=500 width=72) (actual time=13.553..13.553 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
336. 0.001 13.553 ↓ 0.0 0 1

Nested Loop Left Join (cost=89.57..4,038.87 rows=500 width=72) (actual time=13.553..13.553 rows=0 loops=1)

337. 0.001 13.552 ↓ 0.0 0 1

Hash Left Join (cost=88.86..100.74 rows=500 width=48) (actual time=13.552..13.552 rows=0 loops=1)

  • Hash Cond: (pi.parent_id = wi_4.id)
338. 13.551 13.551 ↓ 0.0 0 1

CTE Scan on parent_instance pi (cost=0.00..10.00 rows=500 width=16) (actual time=13.551..13.551 rows=0 loops=1)

339. 0.000 0.000 ↓ 0.0 0

Hash (cost=88.75..88.75 rows=9 width=36) (never executed)

340. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.84..88.75 rows=9 width=36) (never executed)

341. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.55..85.72 rows=9 width=12) (never executed)

342. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=1.12..1.23 rows=10 width=8) (never executed)

  • Group Key: test5f6c74b5ad0ebbea56e8daf652e32c381525fc3230093_1.instance_id
343. 0.000 0.000 ↓ 0.0 0

Seq Scan on test5f6c74b5ad0ebbea56e8daf652e32c381525fc3230093 test5f6c74b5ad0ebbea56e8daf652e32c381525fc3230093_1 (cost=0.00..1.10 rows=10 width=8) (never executed)

344. 0.000 0.000 ↓ 0.0 0

Index Scan using pe_instance_pkey on wf_instance wi_4 (cost=0.42..8.44 rows=1 width=4) (never executed)

  • Index Cond: (id = test5f6c74b5ad0ebbea56e8daf652e32c381525fc3230093_1.instance_id)
  • Filter: (NOT deleted)
345. 0.000 0.000 ↓ 0.0 0

Index Scan using eurzad_t_sprawa_uid on eurzad_teczka et_3 (cost=0.29..0.33 rows=1 width=36) (never executed)

  • Index Cond: (sprawa_uid = wi_4.id)
346. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.71..7.87 rows=1 width=36) (never executed)

347. 0.000 0.000 ↓ 0.0 0

Index Scan using pe_instance_pkey on wf_instance wi_3 (cost=0.42..7.53 rows=1 width=4) (never executed)

  • Index Cond: (pi.parent_id = id)
  • Filter: (NOT deleted)
348. 0.000 0.000 ↓ 0.0 0

Index Scan using eurzad_t_sprawa_uid on eurzad_teczka et_2 (cost=0.29..0.33 rows=1 width=25) (never executed)

  • Index Cond: (sprawa_uid = wi_3.id)
349. 0.006 0.059 ↑ 2.0 1 1

Nested Loop Left Join (cost=1.27..1.69 rows=2 width=8) (actual time=0.057..0.059 rows=1 loops=1)

350. 0.004 0.027 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.84..1.01 rows=1 width=22) (actual time=0.026..0.027 rows=1 loops=1)

351. 0.007 0.007 ↑ 1.0 1 1

Index Scan using pe_instance_pkey on wf_instance wi_2 (cost=0.42..0.51 rows=1 width=12) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (wf_instance.id = id)
  • Filter: (NOT deleted)
352. 0.016 0.016 ↑ 1.0 1 1

Index Scan using eurzad_sprawa_przedluzanie_pk on eurzad_sprawa_przedluzanie esp (cost=0.42..0.50 rows=1 width=14) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (sprawa_uid = wi_2.id)
353. 0.001 0.026 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.42..0.57 rows=1 width=19) (actual time=0.025..0.026 rows=1 loops=1)

354. 0.019 0.019 ↑ 1.0 1 1

Index Scan using users_usergroups_i54 on users_usergroups (cost=0.27..0.29 rows=1 width=8) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: (wi_2.workstation_id = group_id)
  • Filter: ((typ)::text = 'Z'::text)
355. 0.006 0.006 ↑ 1.0 1 1

Index Scan using warning_thresholds_pkey on warning_thresholds (cost=0.15..0.27 rows=1 width=19) (actual time=0.005..0.006 rows=1 loops=1)

  • Index Cond: (users_usergroups."userId" = user_id)
Planning time : 121.915 ms
Execution time : 9,834.263 ms