explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SI9p

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 910.734 ↓ 3.0 3 1

Limit (cost=21,138.87..21,138.90 rows=1 width=139) (actual time=910.726..910.734 rows=3 loops=1)

2. 0.024 910.730 ↓ 3.0 3 1

Unique (cost=21,138.87..21,138.90 rows=1 width=139) (actual time=910.723..910.730 rows=3 loops=1)

3. 0.152 910.706 ↓ 3.0 3 1

Sort (cost=21,138.87..21,138.87 rows=1 width=139) (actual time=910.706..910.706 rows=3 loops=1)

  • Sort Key: tucastnikdotaznik.tucadot_dokonceni_datum DESC, tuzivatel.tuzi_pk, tuzivatel.tuzi_jmeno, tuzivatel.tuzi_prijmeni, tuzivatel.tuzi_email, tucastnikdotaznik.tucadot_pk, tdotaznik.tdot_nazev, tdotaznik.tdot_nazev_interni, tprojekt_1.tpro_nazev, tprojekt_1.tpro_pk, tdotaznik.tdot_dotaznik_typ
  • Sort Method: quicksort Memory: 25kB
4. 0.028 910.554 ↓ 3.0 3 1

Nested Loop (cost=1,148.27..21,138.86 rows=1 width=139) (actual time=883.460..910.554 rows=3 loops=1)

5. 0.656 910.436 ↓ 3.0 3 1

Nested Loop (cost=1,147.98..21,138.56 rows=1 width=151) (actual time=883.391..910.436 rows=3 loops=1)

  • Join Filter: (tucastnikprojekt.tpro_pk = "*SELECT* 1".tpro_pk)
  • Rows Removed by Join Filter: 4935
6. 0.030 876.765 ↓ 3.0 3 1

Nested Loop (cost=1,146.71..20,060.48 rows=1 width=147) (actual time=867.042..876.765 rows=3 loops=1)

7. 2.441 876.531 ↓ 3.0 3 1

Nested Loop Left Join (cost=1,146.29..20,058.04 rows=1 width=151) (actual time=866.858..876.531 rows=3 loops=1)

  • Join Filter: (tucastnikdotaznik.tdot_pk = tdotaznik_config.tdot_pk)
  • Rows Removed by Join Filter: 16104
8. 0.018 852.529 ↓ 3.0 3 1

Nested Loop (cost=1,146.29..19,200.24 rows=1 width=155) (actual time=849.855..852.529 rows=3 loops=1)

9. 350.504 852.403 ↓ 3.0 3 1

Nested Loop (cost=1,146.01..19,199.92 rows=1 width=92) (actual time=849.787..852.403 rows=3 loops=1)

  • -> Index Scan using tucastnikdotaznik_tucabal_pk_idx on tucastnikdotaznik (cost=0.42..0.48 rows=1 width=28) (actual time=0.007..0.007 rows=0loops=47640)
10. 55.920 501.899 ↓ 47,640.0 47,640 1

Nested Loop (cost=1,145.58..19,199.43 rows=1 width=80) (actual time=7.136..501.899 rows=47,640 loops=1)

  • Index Cond: (tucabal_pk = tucastnikbalicek.tucabal_pk)
  • Filter: ((NOT tucadot_s_skryt) AND (tucadot_dokonceni_datum IS NOT NULL) AND ((tucadot_hodnoceny_vztah IS NULL) OR (tucadot_hodnoceny_vztah = 'Sebehodnocení'::text)) AND (tucadot_dokonceni_datum > (now() - '2 mons'::interval)))
  • Rows Removed by Filter: 1
11. 59.539 302.879 ↓ 47,700.0 47,700 1

Nested Loop (cost=1,145.30..19,199.13 rows=1 width=84) (actual time=7.096..302.879 rows=47,700 loops=1)

12. 0.000 100.240 ↓ 47,700.0 47,700 1

Gather (cost=1,145.03..19,196.83 rows=1 width=84) (actual time=7.056..100.240 rows=47,700 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
13. 82.000 276.871 ↓ 15,900.0 15,900 3

Nested Loop (cost=145.03..18,196.73 rows=1 width=84) (actual time=1.892..276.871 rows=15,900 loops=3)

  • -> Index Scan using tprojekt_pkey on tprojekt tprojekt_1 (cost=0.29..0.30 rows=1 width=32) (actual time=0.004..0.004rows=1 loops=48023)
14. 76.774 194.871 ↓ 320.2 16,008 3

Nested Loop (cost=144.74..18,181.50 rows=50 width=52) (actual time=1.794..194.871 rows=16,008 loops=3)

  • Join Filter: (tucastnik.tuca_pk = tucastnikbalicek.tuca_pk)
  • -> Index Scan using tucastnikbalicek_tuca_pk_tpro_pk_idx on tucastnikbalicek (cost=0.42..0.47 rows=1 width=16)(actual time=0.008..0.010 rows=3 loops=18784)
  • Index Cond: (tpro_pk = tucastnikprojekt.tpro_pk)
  • Filter: (NOT tpro_s_skryt)
  • Rows Removed by Filter: 0
15. 53.667 118.097 ↓ 1.3 6,261 3

Nested Loop (cost=144.32..15,826.33 rows=4,897 width=48) (actual time=1.691..118.097 rows=6,261 loops=3)

  • Index Cond: ((tuca_pk = tucastnikprojekt.tuca_pk) AND (tpro_pk = tucastnikprojekt.tpro_pk))
  • Filter: ((NOT tucabal_s_skryt) AND (NOT tucabal_s_skryt))
  • Rows Removed by Filter: 0
16. 43.074 64.419 ↑ 1.2 4,501 3

Nested Loop (cost=143.89..13,187.81 rows=5,624 width=40) (actual time=1.582..64.419 rows=4,501 loops=3)

17. 21.337 21.337 ↑ 1.3 4,501 3

Parallel Bitmap Heap Scan on tuzivatel (cost=143.47..9,058.07 rows=5,638 width=36) (actual time=1.465..21.337 rows=4,501 loops=3)

  • Recheck Cond: (tzak_pk = 94)
  • Filter: (NOT tuzi_s_skryt)
  • Rows Removed by Filter: 10
  • Heap Blocks: exact=7
  • -> Bitmap Index Scan on tuzivatel_tzak_pk_idx (cost=0.00..140.09 rows=13555 width=0) (actualtime=3.757..3.757 rows=13534 loops=1)
  • Index Cond: (tzak_pk = 94)
18. 0.008 0.008 ↑ 1.0 1 13,503

Index Scan using tucastnik_tuzi_pk_idx on tucastnik (cost=0.42..0.72 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=13,503)

  • Index Cond: (tuzi_pk = tuzivatel.tuzi_pk)
  • Filter: ((NOT tuca_s_skryt) AND (NOT tuca_s_skryt))
19. 0.011 0.011 ↑ 1.0 1 13,503

Index Scan using tucastnikprojekt_tuca_pk_tpro_pk_idx on tucastnikprojekt (cost=0.42..0.46 rows=1 width=8) (actual time=0.008..0.011 rows=1 loops=13,503)

  • Index Cond: (tuca_pk = tucastnik.tuca_pk)
  • Filter: (NOT tucapro_s_skryt)
  • Rows Removed by Filter: 0
20. 143.100 143.100 ↑ 1.0 1 47,700

Index Scan using tzakaznik_pkey on tzakaznik (cost=0.28..2.29 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=47,700)

  • Index Cond: (tzak_pk = 94)
  • Filter: (NOT tzak_s_skryt)
21. 143.100 143.100 ↑ 1.0 1 47,700

Index Scan using tbalicek_pkey on tbalicek (cost=0.28..0.30 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=47,700)

  • Index Cond: (tbal_pk = tucastnikbalicek.tbal_pk)
  • Filter: (NOT tbal_s_skryt)
  • Rows Removed by Filter: 0
22. 0.108 0.108 ↑ 1.0 1 3

Index Scan using tdotaznik_pkey on tdotaznik (cost=0.28..0.32 rows=1 width=67) (actual time=0.036..0.036 rows=1 loops=3)

  • Index Cond: (tdot_pk = tucastnikdotaznik.tdot_pk)
  • Filter: (NOT tdot_s_skryt)
23. 21.561 21.561 ↑ 1.0 5,369 3

Seq Scan on tdotaznik_config (cost=0.00..790.69 rows=5,369 width=4) (actual time=0.016..7.187 rows=5,369 loops=3)

24. 0.204 0.204 ↑ 1.0 1 3

Index Only Scan using tuzivatel_pkey on tuzivatel tuzivatelspravcehlavni (cost=0.42..2.44 rows=1 width=4) (actual time=0.068..0.068 rows=1 loops=3)

  • Index Cond: (tuzi_pk = tzakaznik.tuzi_pk_spravce)
  • Heap Fetches: 3
25. 0.963 33.015 ↓ 10.3 1,646 3

Append (cost=1.27..1,076.07 rows=160 width=4) (actual time=0.198..11.005 rows=1,646 loops=3)

26. 0.003 0.126 ↓ 0.0 0 3

Subquery Scan on *SELECT* 1 (cost=1.27..62.29 rows=18 width=4) (actual time=0.042..0.042 rows=0 loops=3)

27. 0.000 0.123 ↓ 0.0 0 3

Nested Loop (cost=1.27..62.11 rows=18 width=124) (actual time=0.041..0.041 rows=0 loops=3)

28. 0.012 0.123 ↓ 0.0 0 3

Nested Loop (cost=0.70..4.75 rows=1 width=4) (actual time=0.041..0.041 rows=0 loops=3)

29. 0.060 0.060 ↑ 1.0 1 3

Index Scan using tuzivatel_pkey on tuzivatel tuzivatel_1 (cost=0.42..2.44 rows=1 width=8) (actual time=0.019..0.020 rows=1 loops=3)

  • Index Cond: (tuzi_pk = 4996)
  • Filter: ((NOT tuzi_s_skryt) AND (tuzi_stav = 1))
30. 0.051 0.051 ↓ 0.0 0 3

Index Scan using tzakaznik_pkey on tzakaznik tzakaznik_1 (cost=0.28..2.29 rows=1 width=8) (actual time=0.017..0.017 rows=0 loops=3)

  • Index Cond: (tzak_pk = tuzivatel_1.tzak_pk)
  • Filter: (tuzi_pk_spravce <> tuzivatel_1.tuzi_pk)
  • Rows Removed by Filter: 1
31. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..57.18 rows=18 width=8) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Index Scan using tuzivatelprojekt_tuzi_pk_idx on tuzivatelprojekt (cost=0.29..15.13 rows=20 width=8) (never executed)

  • Index Cond: (tuzi_pk = 4996)
  • Filter: (NOT tuzipro_s_skryt)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using tprojekt_pkey on tprojekt tprojekt_2 (cost=0.29..2.10 rows=1 width=4) (never executed)

  • Index Cond: (tpro_pk = tuzivatelprojekt.tpro_pk)
  • Filter: (NOT tpro_s_skryt)
34. 0.780 31.926 ↓ 11.6 1,646 3

Subquery Scan on *SELECT* 2 (cost=22.53..1,013.78 rows=142 width=4) (actual time=0.156..10.642 rows=1,646 loops=3)

35. 5.718 31.146 ↓ 11.6 1,646 3

Hash Join (cost=22.53..1,012.36 rows=142 width=124) (actual time=0.155..10.382 rows=1,646 loops=3)

  • Hash Cond: (tprojekt_3.tzak_pk = tuzivatel_2.tzak_pk)
36. 25.131 25.131 ↓ 1.0 10,986 3

Seq Scan on tprojekt tprojekt_3 (cost=0.00..947.23 rows=10,983 width=8) (actual time=0.016..8.377 rows=10,986 loops=3)

  • Filter: (NOT tpro_s_skryt)
  • Rows Removed by Filter: 1040
37. 0.028 0.297 ↑ 1.0 1 1

Hash (cost=22.52..22.52 rows=1 width=4) (actual time=0.297..0.297 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
38. 0.003 0.269 ↑ 1.0 1 1

Nested Loop (cost=0.42..22.52 rows=1 width=4) (actual time=0.223..0.269 rows=1 loops=1)

39. 0.232 0.232 ↑ 1.0 1 1

Seq Scan on tzakaznik tzakaznik_2 (cost=0.00..20.06 rows=1 width=4) (actual time=0.188..0.232 rows=1 loops=1)

  • Filter: (tuzi_pk_spravce = 4996)
  • Rows Removed by Filter: 647
40. 0.034 0.034 ↑ 1.0 1 1

Index Scan using tuzivatel_pkey on tuzivatel tuzivatel_2 (cost=0.42..2.44 rows=1 width=8) (actual time=0.032..0.034 rows=1 loops=1)

  • Index Cond: (tuzi_pk = 4996)
  • Filter: ((NOT tuzi_s_skryt) AND (tuzi_stav = 1))
41. 0.090 0.090 ↑ 1.0 1 3

Index Scan using tprojekt_pkey on tprojekt (cost=0.29..0.30 rows=1 width=4) (actual time=0.030..0.030 rows=1 loops=3)

  • Index Cond: (tpro_pk = tucastnikprojekt.tpro_pk)
  • Filter: (testovaci_tdot_pk IS NULL)