explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OmvJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 18,679.069 ↓ 3.0 3 1

Limit (cost=25,978.37..25,978.40 rows=1 width=139) (actual time=18,679.062..18,679.069 rows=3 loops=1)

2. 0.007 18,679.065 ↓ 3.0 3 1

Unique (cost=25,978.37..25,978.40 rows=1 width=139) (actual time=18,679.060..18,679.065 rows=3 loops=1)

3. 0.195 18,679.058 ↓ 3.0 3 1

Sort (cost=25,978.37..25,978.37 rows=1 width=139) (actual time=18,679.057..18,679.058 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: 28kB
4. 0.082 18,678.863 ↓ 12.0 12 1

Nested Loop (cost=1,004.66..25,978.36 rows=1 width=139) (actual time=1,012.573..18,678.863 rows=12 loops=1)

5. 3.093 18,678.577 ↓ 12.0 12 1

Nested Loop (cost=1,004.37..25,978.05 rows=1 width=151) (actual time=1,012.491..18,678.577 rows=12 loops=1)

  • Join Filter: (tucastnikprojekt.tpro_pk = "*SELECT* 1".tpro_pk)
  • Rows Removed by Join Filter: 19812
6. 0.103 18,569.128 ↓ 12.0 12 1

Nested Loop (cost=1,003.10..24,806.26 rows=1 width=147) (actual time=996.722..18,569.128 rows=12 loops=1)

7. 3.308 18,568.773 ↓ 12.0 12 1

Nested Loop (cost=1,002.68..24,803.82 rows=1 width=151) (actual time=996.624..18,568.773 rows=12 loops=1)

  • Join Filter: (tucastnikdotaznik.tdot_pk = tdotaznik.tdot_pk)
  • Rows Removed by Join Filter: 29554
8. 13.957 18,554.917 ↓ 12.0 12 1

Nested Loop Left Join (cost=1,002.68..24,603.47 rows=1 width=92) (actual time=993.310..18,554.917 rows=12 loops=1)

  • Join Filter: (tucastnikdotaznik.tdot_pk = tdotaznik_config.tdot_pk)
  • Rows Removed by Join Filter: 64809
9. 563.226 18,523.848 ↓ 12.0 12 1

Nested Loop (cost=1,002.68..23,732.51 rows=1 width=92) (actual time=989.164..18,523.848 rows=12 loops=1)

  • -> Index Scan using tucastnikdotaznik_tucabal_pk_idx on tucastnikdotaznik (cost=0.42..0.49 rows=1 width=28) (actual time=0.010..0.010 rows=0loops=47769)
10. 4,648.116 17,960.622 ↓ 47,769.0 47,769 1

Nested Loop (cost=1,002.25..23,732.02 rows=1 width=80) (actual time=5.010..17,960.622 rows=47,769 loops=1)

  • Join Filter: (tucastnikbalicek.tbal_pk = tbalicek.tbal_pk)
  • Rows Removed by Join Filter: 42630468
  • 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. 73.890 924.795 ↓ 47,829.0 47,829 1

Nested Loop (cost=1,002.25..23,517.18 rows=1 width=84) (actual time=2.534..924.795 rows=47,829 loops=1)

12. 0.000 563.931 ↓ 47,829.0 47,829 1

Gather (cost=1,001.98..23,514.88 rows=1 width=84) (actual time=2.504..563.931 rows=47,829 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
13. 209.084 624.287 ↓ 23,914.0 23,914 2

Nested Loop (cost=1.98..22,514.78 rows=1 width=84) (actual time=0.422..624.287 rows=23,914 loops=2)

  • -> Index Scan using tprojekt_pkey on tprojekt tprojekt_1 (cost=0.29..0.30 rows=1 width=32) (actual time=0.007..0.007rows=1 loops=48152)
14. 184.362 415.203 ↓ 316.8 24,076 2

Nested Loop (cost=1.70..22,491.62 rows=76 width=52) (actual time=0.355..415.203 rows=24,076 loops=2)

  • 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.009..0.016 rows=3 loops=18821)
  • Index Cond: (tpro_pk = tucastnikprojekt.tpro_pk)
  • Filter: (NOT tpro_s_skryt)
  • Rows Removed by Filter: 0
15. 98.637 230.841 ↓ 1.3 9,410 2

Nested Loop (cost=1.27..18,925.73 rows=7,403 width=48) (actual time=0.262..230.841 rows=9,410 loops=2)

  • 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. 94.925 132.191 ↑ 1.2 6,770 2

Nested Loop (cost=0.84..14,964.22 rows=8,404 width=40) (actual time=0.180..132.191 rows=6,770 loops=2)

17. 37.255 37.255 ↑ 1.2 6,770 2

Parallel Index Scan using tuzivatel_tzak_pk_idx on tuzivatel (cost=0.42..8,993.96 rows=7,938 width=36) (actual time=0.063..37.255 rows=6,770 loops=2)

  • Index Cond: (tzak_pk = 94)
  • Filter: (NOT tuzi_s_skryt)
  • Rows Removed by Filter: 16
18. 0.011 0.011 ↑ 1.0 1 13,540

Index Scan using tucastnik_tuzi_pk_idx on tucastnik (cost=0.42..0.74 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=13,540)

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

Index Scan using tucastnikprojekt_tuca_pk_tpro_pk_idx on tucastnikprojekt (cost=0.42..0.46 rows=1 width=8) (actual time=0.009..0.013 rows=1 loops=13,540)

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

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

  • Index Cond: (tzak_pk = 94)
  • Filter: (NOT tzak_s_skryt)
21. 12,387.711 12,387.711 ↑ 5.8 892 47,829

Seq Scan on tbalicek (cost=0.00..150.62 rows=5,137 width=4) (actual time=0.005..0.259 rows=892 loops=47,829)

  • Filter: (NOT tbal_s_skryt)
  • Rows Removed by Filter: 131
22. 17.112 17.112 ↓ 1.0 5,401 12

Seq Scan on tdotaznik_config (cost=0.00..803.76 rows=5,376 width=4) (actual time=0.008..1.426 rows=5,401 loops=12)

23. 10.548 10.548 ↑ 1.9 2,464 12

Seq Scan on tdotaznik (cost=0.00..142.52 rows=4,626 width=67) (actual time=0.012..0.879 rows=2,464 loops=12)

  • Filter: (NOT tdot_s_skryt)
  • Rows Removed by Filter: 462
24. 0.252 0.252 ↑ 1.0 1 12

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

  • Index Cond: (tuzi_pk = tzakaznik.tuzi_pk_spravce)
  • Heap Fetches: 12
25. 3.168 106.356 ↓ 9.7 1,652 12

Append (cost=1.27..1,169.66 rows=171 width=4) (actual time=0.106..8.863 rows=1,652 loops=12)

26. 0.012 0.372 ↓ 0.0 0 12

Subquery Scan on *SELECT* 1 (cost=1.27..70.50 rows=21 width=4) (actual time=0.031..0.031 rows=0 loops=12)

27. 0.000 0.360 ↓ 0.0 0 12

Nested Loop (cost=1.27..70.29 rows=21 width=124) (actual time=0.030..0.030 rows=0 loops=12)

28. 0.048 0.360 ↓ 0.0 0 12

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

29. 0.192 0.192 ↑ 1.0 1 12

Index Scan using tuzivatel_pkey on tuzivatel tuzivatel_1 (cost=0.42..2.44 rows=1 width=8) (actual time=0.015..0.016 rows=1 loops=12)

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

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

  • 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..65.34 rows=21 width=8) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Index Scan using tuzivatelprojekt_tuzi_pk_idx on tuzivatelprojekt (cost=0.29..17.38 rows=23 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.09 rows=1 width=4) (never executed)

  • Index Cond: (tpro_pk = tuzivatelprojekt.tpro_pk)
  • Filter: (NOT tpro_s_skryt)
34. 3.492 102.816 ↓ 11.0 1,652 12

Subquery Scan on *SELECT* 2 (cost=22.25..1,099.15 rows=150 width=4) (actual time=0.075..8.568 rows=1,652 loops=12)

35. 24.772 99.324 ↓ 11.0 1,652 12

Hash Join (cost=22.25..1,097.65 rows=150 width=124) (actual time=0.074..8.277 rows=1,652 loops=12)

  • Hash Cond: (tprojekt_3.tzak_pk = tuzivatel_2.tzak_pk)
36. 74.088 74.088 ↑ 1.0 11,071 12

Seq Scan on tprojekt tprojekt_3 (cost=0.00..1,032.34 rows=11,083 width=8) (actual time=0.006..6.174 rows=11,071 loops=12)

  • Filter: (NOT tpro_s_skryt)
  • Rows Removed by Filter: 1047
37. 0.037 0.464 ↑ 1.0 1 1

Hash (cost=22.24..22.24 rows=1 width=4) (actual time=0.464..0.464 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
38. 0.005 0.427 ↑ 1.0 1 1

Nested Loop (cost=0.42..22.24 rows=1 width=4) (actual time=0.350..0.427 rows=1 loops=1)

39. 0.375 0.375 ↑ 1.0 1 1

Seq Scan on tzakaznik tzakaznik_2 (cost=0.00..19.79 rows=1 width=4) (actual time=0.302..0.375 rows=1 loops=1)

  • Filter: (tuzi_pk_spravce = 4996)
  • Rows Removed by Filter: 649
40. 0.047 0.047 ↑ 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.044..0.047 rows=1 loops=1)

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

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

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