explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Afn3

Settings
# exclusive inclusive rows x rows loops node
1. 0.060 18,910.182 ↓ 16.0 48 1

Sort (cost=36,455.45..36,455.46 rows=3 width=216) (actual time=18,910.181..18,910.182 rows=48 loops=1)

  • Sort Key: tbw.fallid, tbw.startdate, tbw.missingdate
  • Sort Method: quicksort Memory: 37kB
2.          

CTE bewegdata

3. 0.248 18,908.567 ↑ 1.7 275 1

Subquery Scan on abc (cost=4,086.45..36,380.39 rows=468 width=39) (actual time=27.079..18,908.567 rows=275 loops=1)

4. 4.192 18,908.319 ↑ 1.7 275 1

Nested Loop (cost=4,086.45..36,373.37 rows=468 width=79) (actual time=27.075..18,908.319 rows=275 loops=1)

  • Join Filter: ((((rownum - 1)))::numeric <= (SubPlan 1))
  • Rows Removed by Join Filter: 817
5. 0.306 1.754 ↓ 3.0 3 1

Result (cost=237.54..238.41 rows=1 width=103) (actual time=1.597..1.754 rows=3 loops=1)

6. 0.008 1.448 ↓ 3.0 3 1

Sort (cost=237.54..237.55 rows=1 width=95) (actual time=1.446..1.448 rows=3 loops=1)

  • Sort Key: tb.fallid
  • Sort Method: quicksort Memory: 25kB
7. 0.023 1.440 ↓ 3.0 3 1

Nested Loop Semi Join (cost=224.26..237.53 rows=1 width=95) (actual time=1.396..1.440 rows=3 loops=1)

8. 0.008 1.402 ↓ 3.0 3 1

Nested Loop (cost=223.98..229.22 rows=1 width=55) (actual time=1.375..1.402 rows=3 loops=1)

9. 0.062 1.385 ↓ 3.0 3 1

Bitmap Heap Scan on tblbewegung tb (cost=223.98..228.12 rows=1 width=47) (actual time=1.367..1.385 rows=3 loops=1)

  • Recheck Cond: (((bewegungsdatum >= add_months(to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '-6'::numeric)) AND (bewegungsdatum <= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND ((((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= add_months(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '6'::numeric))) OR (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying))))) OR ((bewegungsdatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (bewegungsdatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND ((((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= add_months(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '6'::numeric))) OR (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying))))) OR ((bewegungsdatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (bewegungsdatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND ((((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying))) OR (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying))))) OR ((bewegungsdatum >= add_months(to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '-6'::numeric)) AND (bewegungsdatum <= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND ((((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying))) OR (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying))))))
  • Filter: ((stornierer IS NULL) AND ((bewegungstyp)::text = ANY ('{Aufnahme,Verlegung}'::text[])) AND ((status IS NULL) OR ((status)::text <> 'P'::text)) AND (NOT (hashed SubPlan 4)) AND ((einrichtung)::text = 'Ein1'::text) AND ((fachlicheoe)::text = 'ADMIN'::text) AND (((bewegungsdatum >= add_months(to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '-6'::numeric)) AND (bewegungsdatum <= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (((endedatum >= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= add_months(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '6'::numeric))) OR (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying)))) OR ((bewegungsdatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (bewegungsdatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (((endedatum >= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= add_months(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '6'::numeric))) OR (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying)))) OR ((bewegungsdatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (bewegungsdatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (((endedatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying))) OR (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying)))) OR ((bewegungsdatum >= add_months(to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '-6'::numeric)) AND (bewegungsdatum <= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (((endedatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying))) OR (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying))))))
  • Rows Removed by Filter: 5
  • Heap Blocks: exact=8
10. 0.003 1.129 ↓ 0.0 0 1

BitmapOr (cost=189.06..189.06 rows=1 width=0) (actual time=1.129..1.129 rows=0 loops=1)

11. 0.021 0.519 ↓ 0.0 0 1

BitmapAnd (cost=53.94..53.94 rows=1 width=0) (actual time=0.519..0.519 rows=0 loops=1)

12. 0.336 0.336 ↓ 7.6 5,179 1

Bitmap Index Scan on xie2tblbewegung (cost=0.00..19.20 rows=677 width=0) (actual time=0.336..0.336 rows=5,179 loops=1)

  • Index Cond: ((bewegungsdatum >= add_months(to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '-6'::numeric)) AND (bewegungsdatum <= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
13. 0.001 0.162 ↓ 0.0 0 1

BitmapOr (cost=34.49..34.49 rows=90 width=0) (actual time=0.162..0.162 rows=0 loops=1)

14. 0.113 0.113 ↓ 0.0 0 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..17.78 rows=1 width=0) (actual time=0.113..0.113 rows=0 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= add_months(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '6'::numeric)))
15. 0.048 0.048 ↓ 3.2 284 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..16.70 rows=90 width=0) (actual time=0.048..0.048 rows=284 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying)))
16. 0.004 0.109 ↓ 0.0 0 1

BitmapAnd (cost=40.22..40.22 rows=1 width=0) (actual time=0.109..0.109 rows=0 loops=1)

17. 0.019 0.019 ↓ 2.4 251 1

Bitmap Index Scan on xie2tblbewegung (cost=0.00..5.49 rows=106 width=0) (actual time=0.019..0.019 rows=251 loops=1)

  • Index Cond: ((bewegungsdatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (bewegungsdatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
18. 0.000 0.086 ↓ 0.0 0 1

BitmapOr (cost=34.49..34.49 rows=90 width=0) (actual time=0.086..0.086 rows=0 loops=1)

19. 0.040 0.040 ↓ 0.0 0 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..17.78 rows=1 width=0) (actual time=0.040..0.040 rows=0 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= add_months(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '6'::numeric)))
20. 0.046 0.046 ↓ 3.2 284 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..16.70 rows=90 width=0) (actual time=0.046..0.046 rows=284 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying)))
21. 0.003 0.099 ↓ 0.0 0 1

BitmapAnd (cost=40.22..40.22 rows=1 width=0) (actual time=0.099..0.099 rows=0 loops=1)

22. 0.016 0.016 ↓ 2.4 251 1

Bitmap Index Scan on xie2tblbewegung (cost=0.00..5.49 rows=106 width=0) (actual time=0.016..0.016 rows=251 loops=1)

  • Index Cond: ((bewegungsdatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (bewegungsdatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
23. 0.000 0.080 ↓ 0.0 0 1

BitmapOr (cost=34.48..34.48 rows=90 width=0) (actual time=0.080..0.080 rows=0 loops=1)

24. 0.039 0.039 ↓ 0.0 0 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..17.78 rows=1 width=0) (actual time=0.039..0.039 rows=0 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
25. 0.041 0.041 ↓ 3.2 284 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..16.70 rows=90 width=0) (actual time=0.041..0.041 rows=284 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying)))
26. 0.020 0.399 ↓ 0.0 0 1

BitmapAnd (cost=53.93..53.93 rows=1 width=0) (actual time=0.399..0.399 rows=0 loops=1)

27. 0.285 0.285 ↓ 7.6 5,179 1

Bitmap Index Scan on xie2tblbewegung (cost=0.00..19.20 rows=677 width=0) (actual time=0.285..0.285 rows=5,179 loops=1)

  • Index Cond: ((bewegungsdatum >= add_months(to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), '-6'::numeric)) AND (bewegungsdatum <= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
28. 0.001 0.094 ↓ 0.0 0 1

BitmapOr (cost=34.48..34.48 rows=90 width=0) (actual time=0.094..0.094 rows=0 loops=1)

29. 0.050 0.050 ↓ 0.0 0 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..17.78 rows=1 width=0) (actual time=0.050..0.050 rows=0 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (endedatum <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
30. 0.043 0.043 ↓ 3.2 284 1

Bitmap Index Scan on xie7tblbewegung (cost=0.00..16.70 rows=90 width=0) (actual time=0.043..0.043 rows=284 loops=1)

  • Index Cond: (((pflegerischeoe)::text = 'PSA'::text) AND (endedatum = to_date('31.12.9990'::character varying, 'DD.MM.YYYY'::character varying)))
31.          

SubPlan (for Bitmap Heap Scan)

32. 0.194 0.194 ↑ 1.0 13 1

Seq Scan on katbewegungsart (cost=0.00..34.89 rows=13 width=8) (actual time=0.021..0.194 rows=13 loops=1)

  • Filter: ((hostcode)::text = ANY ('{B,MB}'::text[]))
  • Rows Removed by Filter: 1,098
33. 0.009 0.009 ↑ 1.0 1 3

Seq Scan on katpprparameter (cost=0.00..1.09 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=3)

  • Filter: ((einrichtung)::text = 'Ein1'::text)
  • Rows Removed by Filter: 6
34. 0.015 0.015 ↑ 1.0 1 3

Index Scan using xpkkatoe on katoe (cost=0.27..8.30 rows=1 width=7) (actual time=0.005..0.005 rows=1 loops=3)

  • Index Cond: ((oe)::text = 'PSA'::text)
  • Filter: ((nvl(oenichtppr, 'N'::character varying))::text <> 'J'::text)
35. 135.636 18,898.005 ↑ 3.9 364 3

Result (cost=3,848.91..34,533.22 rows=1,404 width=8) (actual time=8.567..6,299.335 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
36. 1.431 18,762.369 ↓ 1.9 2,725 3

Append (cost=3,848.91..34,515.67 rows=1,404 width=0) (actual time=8.547..6,254.123 rows=2,725 loops=3)

37. 1,609.686 1,991.322 ↓ 3.5 364 3

Subquery Scan on *SELECT* 1 (cost=3,848.91..5,790.13 rows=105 width=0) (actual time=8.547..663.774 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
  • Rows Removed by Filter: 32,423
38. 61.185 381.636 ↓ 104.4 32,787 3

Nested Loop (cost=3,848.91..5,703.78 rows=314 width=192) (actual time=8.496..127.212 rows=32,787 loops=3)

39. 21.672 123.729 ↓ 59.2 32,787 3

Hash Join (cost=3,848.61..5,367.67 rows=554 width=4) (actual time=8.485..41.243 rows=32,787 loops=3)

  • Hash Cond: (c.relnamespace = n.oid)
40. 60.464 101.277 ↓ 19.8 32,921 3

Hash Join (cost=3,783.43..5,298.11 rows=1,665 width=8) (actual time=8.160..33.759 rows=32,921 loops=3)

  • Hash Cond: (x.indrelid = c.oid)
41. 16.395 16.395 ↓ 1.0 41,333 3

Seq Scan on pg_index x (cost=0.00..1,406.20 rows=41,320 width=8) (actual time=0.003..5.465 rows=41,333 loops=3)

42. 1.085 24.418 ↓ 3.0 8,757 1

Hash (cost=3,746.58..3,746.58 rows=2,948 width=8) (actual time=24.417..24.418 rows=8,757 loops=1)

  • Buckets: 16,384 (originally 4096) Batches: 1 (originally 1) Memory Usage: 471kB
43. 23.333 23.333 ↓ 3.0 8,757 1

Seq Scan on pg_class c (cost=0.00..3,746.58 rows=2,948 width=8) (actual time=0.022..23.333 rows=8,757 loops=1)

  • Filter: ((relkind = ANY ('{r,p}'::char[])) AND has_table_privilege(oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text))
  • Rows Removed by Filter: 64,440
44. 0.005 0.780 ↑ 25.8 21 1

Hash (cost=58.42..58.42 rows=541 width=4) (actual time=0.780..0.780 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
45. 0.775 0.775 ↑ 25.8 21 1

Seq Scan on pg_namespace n (cost=0.00..58.42 rows=541 width=4) (actual time=0.015..0.775 rows=21 loops=1)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,605
46. 196.722 196.722 ↑ 1.0 1 98,361

Index Scan using pg_class_oid_index on pg_class i (cost=0.29..0.61 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=98,361)

  • Index Cond: (oid = x.indexrelid)
  • Filter: (relkind = ANY ('{i,I}'::char[]))
47. 933.138 15,291.060 ↑ 1.6 364 3

Subquery Scan on all_sequences (cost=65.19..7,649.86 rows=599 width=0) (actual time=1.092..5,097.020 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
  • Rows Removed by Filter: 9,522
48. 14,270.480 14,357.922 ↓ 5.5 9,886 3

Hash Join (cost=65.19..7,155.41 rows=1,798 width=320) (actual time=1.043..4,785.974 rows=9,886 loops=3)

  • Hash Cond: (c_1.relnamespace = n_1.oid)
49. 86.820 86.820 ↓ 1.8 9,886 3

Seq Scan on pg_class c_1 (cost=0.00..3,929.51 rows=5,403 width=8) (actual time=0.009..28.940 rows=9,886 loops=3)

  • Filter: ((relkind = 'S'::char) AND (pg_has_role(relowner, 'USAGE'::text) OR has_table_privilege(oid, 'SELECT, UPDATE'::text)))
  • Rows Removed by Filter: 63,311
50. 0.004 0.622 ↑ 25.8 21 1

Hash (cost=58.42..58.42 rows=541 width=4) (actual time=0.622..0.622 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
51. 0.618 0.618 ↑ 25.8 21 1

Seq Scan on pg_namespace n_1 (cost=0.00..58.42 rows=541 width=4) (actual time=0.014..0.618 rows=21 loops=1)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,605
52. 420.882 523.287 ↓ 1.1 364 3

Subquery Scan on *SELECT* 3 (cost=65.19..4,089.30 rows=327 width=0) (actual time=0.285..174.429 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
  • Rows Removed by Filter: 8,319
53. 9.250 102.405 ↓ 8.9 8,683 3

Hash Join (cost=65.19..3,819.53 rows=981 width=184) (actual time=0.236..34.135 rows=8,683 loops=3)

  • Hash Cond: (c_2.relnamespace = n_2.oid)
54. 92.532 92.532 ↓ 3.0 8,757 3

Seq Scan on pg_class c_2 (cost=0.00..3,746.58 rows=2,948 width=8) (actual time=0.023..30.844 rows=8,757 loops=3)

  • Filter: ((NOT relispartition) AND (relkind = ANY ('{r,p}'::char[])) AND has_table_privilege(oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text))
  • Rows Removed by Filter: 64,440
55. 0.005 0.623 ↑ 25.8 21 1

Hash (cost=58.42..58.42 rows=541 width=4) (actual time=0.623..0.623 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
56. 0.618 0.618 ↑ 25.8 21 1

Seq Scan on pg_namespace n_2 (cost=0.00..58.42 rows=541 width=4) (actual time=0.021..0.618 rows=21 loops=1)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,605
57. 0.201 0.291 ↑ 1.0 1 3

Subquery Scan on *SELECT* 4 (cost=0.28..9.60 rows=1 width=0) (actual time=0.096..0.097 rows=1 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
58. 0.015 0.090 ↑ 1.0 1 3

Nested Loop (cost=0.28..9.32 rows=1 width=192) (actual time=0.030..0.030 rows=1 loops=3)

59. 0.036 0.036 ↑ 1.0 1 3

Seq Scan on pg_synonym sy (cost=0.00..1.01 rows=1 width=25) (actual time=0.011..0.012 rows=1 loops=3)

60. 0.039 0.039 ↑ 1.0 1 3

Index Scan using pg_namespace_oid_index on pg_namespace pnname (cost=0.28..8.30 rows=1 width=68) (actual time=0.013..0.013 rows=1 loops=3)

  • Index Cond: (oid = sy.synnamespace)
  • Filter: ((nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])) AND ((nspname = 'public'::name) OR pg_has_role(sy.synowner, 'USAGE'::text)))
61. 224.187 478.767 ↓ 2.1 364 3

Subquery Scan on *SELECT* 5 (cost=65.19..3,960.86 rows=176 width=0) (actual time=0.306..159.589 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
  • Rows Removed by Filter: 4,162
62. 5.002 254.580 ↓ 8.6 4,526 3

Hash Join (cost=65.19..3,815.93 rows=527 width=192) (actual time=0.272..84.860 rows=4,526 loops=3)

  • Hash Cond: (c_3.relnamespace = n_3.oid)
63. 248.826 248.826 ↓ 2.9 4,644 3

Seq Scan on pg_class c_3 (cost=0.00..3,746.58 rows=1,583 width=4) (actual time=0.015..82.942 rows=4,644 loops=3)

  • Filter: (has_table_privilege(oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) AND (relkind = 'v'::char))
  • Rows Removed by Filter: 68,553
64. 0.007 0.752 ↑ 25.8 21 1

Hash (cost=58.42..58.42 rows=541 width=4) (actual time=0.752..0.752 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
65. 0.745 0.745 ↑ 25.8 21 1

Seq Scan on pg_namespace n_3 (cost=0.00..58.42 rows=541 width=4) (actual time=0.016..0.745 rows=21 loops=1)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,605
66. 30.345 52.299 ↓ 11.0 364 3

Subquery Scan on *SELECT* 6 (cost=69.03..1,189.25 rows=33 width=0) (actual time=1.890..17.433 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
  • Rows Removed by Filter: 242
67. 0.315 21.954 ↓ 6.2 606 3

Nested Loop (cost=69.03..1,162.30 rows=98 width=192) (actual time=1.802..7.318 rows=606 loops=3)

68. 1.071 18.003 ↓ 6.2 606 3

Nested Loop (cost=68.74..620.34 rows=98 width=4) (actual time=1.786..6.001 rows=606 loops=3)

  • Join Filter: (pr.prolang = ln.oid)
  • Rows Removed by Join Filter: 1,818
69. 0.791 16.932 ↓ 6.2 606 3

Hash Join (cost=68.74..612.93 rows=98 width=8) (actual time=1.773..5.644 rows=606 loops=3)

  • Hash Cond: (pr.pronamespace = ns.oid)
70. 15.438 15.438 ↓ 3.0 954 3

Seq Scan on pg_proc pr (cost=0.00..543.36 rows=318 width=12) (actual time=1.531..5.146 rows=954 loops=3)

  • Filter: (has_function_privilege(oid, 'EXECUTE'::text) AND (protype = '1'::char))
  • Rows Removed by Filter: 4,670
71. 0.004 0.703 ↑ 100.0 5 1

Hash (cost=62.49..62.49 rows=500 width=4) (actual time=0.703..0.703 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
72. 0.699 0.699 ↑ 100.0 5 1

Seq Scan on pg_namespace ns (cost=0.00..62.49 rows=500 width=4) (actual time=0.018..0.699 rows=5 loops=1)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspparent = '0'::oid) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,621
73. 0.000 0.000 ↑ 1.2 4 1,818

Materialize (cost=0.00..1.07 rows=5 width=4) (actual time=0.000..0.000 rows=4 loops=1,818)

74. 0.024 0.024 ↑ 1.2 4 1

Seq Scan on pg_language ln (cost=0.00..1.05 rows=5 width=4) (actual time=0.023..0.024 rows=4 loops=1)

75. 3.636 3.636 ↑ 1.0 1 1,818

Index Scan using pg_type_oid_index on pg_type tp_2 (cost=0.29..5.53 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,818)

  • Index Cond: (oid = pr.prorettype)
  • Filter: (typname <> 'trigger'::name)
76. 18.486 36.792 ↓ 2.8 364 3

Subquery Scan on *SELECT* 7 (cost=70.14..2,076.93 rows=129 width=0) (actual time=2.188..12.264 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
  • Rows Removed by Filter: 4
77. 0.333 18.306 ↑ 1.0 368 3

Nested Loop (cost=70.14..1,970.78 rows=386 width=192) (actual time=2.121..6.102 rows=368 loops=3)

78. 0.266 15.753 ↑ 1.0 370 3

Hash Join (cost=69.85..618.39 rows=386 width=4) (actual time=2.108..5.251 rows=370 loops=3)

  • Hash Cond: (pr_1.prolang = ln_1.oid)
79. 0.957 15.477 ↑ 1.0 370 3

Hash Join (cost=68.74..615.40 rows=386 width=8) (actual time=2.099..5.159 rows=370 loops=3)

  • Hash Cond: (pr_1.pronamespace = ns_1.oid)
80. 13.734 13.734 ↓ 3.0 3,721 3

Seq Scan on pg_proc pr_1 (cost=0.00..543.36 rows=1,255 width=12) (actual time=0.005..4.578 rows=3,721 loops=3)

  • Filter: (has_function_privilege(oid, 'EXECUTE'::text) AND (protype = '0'::char))
  • Rows Removed by Filter: 1,903
81. 0.003 0.786 ↑ 100.0 5 1

Hash (cost=62.49..62.49 rows=500 width=4) (actual time=0.786..0.786 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
82. 0.783 0.783 ↑ 100.0 5 1

Seq Scan on pg_namespace ns_1 (cost=0.00..62.49 rows=500 width=4) (actual time=0.014..0.783 rows=5 loops=1)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspparent = '0'::oid) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,621
83. 0.003 0.010 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=4) (actual time=0.010..0.010 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
84. 0.007 0.007 ↑ 1.0 5 1

Seq Scan on pg_language ln_1 (cost=0.00..1.05 rows=5 width=4) (actual time=0.006..0.007 rows=5 loops=1)

85. 2.220 2.220 ↑ 1.0 1 1,110

Index Scan using pg_type_oid_index on pg_type tp_3 (cost=0.29..3.50 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,110)

  • Index Cond: (oid = pr_1.prorettype)
  • Filter: (typname <> 'trigger'::name)
  • Rows Removed by Filter: 0
86. 4.614 5.238 ↓ 19.6 98 3

Subquery Scan on *SELECT* 8 (cost=62.02..68.24 rows=5 width=0) (actual time=0.155..1.746 rows=98 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
87. 0.081 0.624 ↓ 7.0 98 3

Merge Join (cost=62.02..64.39 rows=14 width=192) (actual time=0.132..0.208 rows=98 loops=3)

  • Merge Cond: (ns_2.oid = pg_namespace_2.nspparent)
88. 0.183 0.183 ↑ 90.2 6 3

Index Scan using pg_namespace_oid_index on pg_namespace ns_2 (cost=0.28..107.83 rows=541 width=4) (actual time=0.019..0.061 rows=6 loops=3)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 35
89. 0.051 0.360 ↓ 2.4 98 3

Sort (cost=61.55..61.66 rows=41 width=4) (actual time=0.109..0.120 rows=98 loops=3)

  • Sort Key: pg_namespace_2.nspparent
  • Sort Method: quicksort Memory: 29kB
90. 0.309 0.309 ↓ 2.4 98 1

Seq Scan on pg_namespace pg_namespace_2 (cost=0.00..60.45 rows=41 width=4) (actual time=0.010..0.309 rows=98 loops=1)

  • Filter: ((NOT nspcompoundtrigger) AND (nspparent <> '0'::oid) AND has_package_privilege(oid, 'EXECUTE'::text) AND (nspobjecttype = '0'::oid))
  • Rows Removed by Filter: 1,528
91. 1.551 18.117 ↓ 7.8 31 3

Subquery Scan on *SELECT* 9 (cost=66.05..71.98 rows=4 width=0) (actual time=5.515..6.039 rows=31 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
92. 0.036 16.566 ↓ 2.4 31 3

Merge Join (cost=66.05..68.41 rows=13 width=192) (actual time=5.475..5.522 rows=31 loops=3)

  • Merge Cond: (ns_3.oid = pg_namespace_3.nspparent)
93. 0.141 0.141 ↑ 90.2 6 3

Index Scan using pg_namespace_oid_index on pg_namespace ns_3 (cost=0.28..107.83 rows=541 width=4) (actual time=0.014..0.047 rows=6 loops=3)

  • Filter: (has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 35
94. 0.033 16.389 ↑ 1.3 31 3

Sort (cost=65.58..65.68 rows=40 width=4) (actual time=5.459..5.463 rows=31 loops=3)

  • Sort Key: pg_namespace_3.nspparent
  • Sort Method: quicksort Memory: 26kB
95. 16.356 16.356 ↑ 1.3 31 1

Seq Scan on pg_namespace pg_namespace_3 (cost=0.00..64.52 rows=40 width=4) (actual time=0.190..16.356 rows=31 loops=1)

  • Filter: ((NOT nspcompoundtrigger) AND (nspparent <> '0'::oid) AND (edb_get_packagebodydef(oid, false) IS NOT NULL) AND has_package_privilege(oid, 'EXECUTE'::text) AND (nspobjecttype = '0'::oid))
  • Rows Removed by Filter: 1,595
96. 45.279 143.304 ↓ 15.8 364 3

Subquery Scan on *SELECT* 10 (cost=3,762.82..3,944.97 rows=23 width=0) (actual time=31.649..47.768 rows=364 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
  • Rows Removed by Filter: 544
97. 1.683 98.025 ↓ 13.4 908 3

Hash Join (cost=3,762.82..3,926.27 rows=68 width=192) (actual time=31.599..32.675 rows=908 loops=3)

  • Hash Cond: (t.tgrelid = c_4.oid)
98. 1.629 1.629 ↓ 1.0 922 3

Index Scan using pg_trigger_tgconstraint_index on pg_trigger t (cost=0.29..159.61 rows=921 width=4) (actual time=0.019..0.543 rows=922 loops=3)

  • Index Cond: (tgconstraint = '0'::oid)
  • Filter: (((tgtype)::integer & 60) <> 0)
99. 6.496 94.713 ↓ 10.3 55,887 1

Hash (cost=3,694.84..3,694.84 rows=5,415 width=4) (actual time=94.712..94.713 rows=55,887 loops=1)

  • Buckets: 65,536 (originally 8192) Batches: 1 (originally 1) Memory Usage: 2,477kB
100. 11.717 88.217 ↓ 10.3 55,887 1

Hash Join (cost=67.00..3,694.84 rows=5,415 width=4) (actual time=0.578..88.217 rows=55,887 loops=1)

  • Hash Cond: (c_4.relnamespace = n_4.oid)
101. 75.938 75.938 ↓ 3.0 72,618 1

Seq Scan on pg_class c_4 (cost=0.00..3,563.65 rows=24,391 width=8) (actual time=0.011..75.938 rows=72,618 loops=1)

  • Filter: has_table_privilege(oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text)
  • Rows Removed by Filter: 579
102. 0.005 0.562 ↑ 17.2 21 1

Hash (cost=62.49..62.49 rows=361 width=4) (actual time=0.561..0.562 rows=21 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
103. 0.557 0.557 ↑ 17.2 21 1

Seq Scan on pg_namespace n_4 (cost=0.00..62.49 rows=361 width=4) (actual time=0.009..0.557 rows=21 loops=1)

  • Filter: ((NOT pg_is_other_temp_schema(oid)) AND has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,605
104. 2.595 219.138 ↓ 45.0 45 3

Subquery Scan on *SELECT* 11 (cost=122.85..5,163.38 rows=1 width=0) (actual time=0.769..73.046 rows=45 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
105. 31.878 216.543 ↓ 15.0 45 3

Nested Loop Left Join (cost=122.85..5,162.56 rows=3 width=192) (actual time=0.724..72.181 rows=45 loops=3)

  • Filter: ((c_5.relkind IS NULL) OR (c_5.relkind = 'c'::char))
  • Rows Removed by Filter: 23,200
106. 10.754 114.930 ↓ 11.7 23,245 3

Hash Join (cost=122.56..2,501.75 rows=1,993 width=4) (actual time=0.317..38.310 rows=23,245 loops=3)

  • Hash Cond: (t_1.typnamespace = n_5.oid)
107. 103.281 103.281 ↓ 2.7 32,070 3

Seq Scan on pg_type t_1 (cost=0.00..2,347.60 rows=12,005 width=8) (actual time=0.012..34.427 rows=32,070 loops=3)

  • Filter: (has_type_privilege(oid, 'USAGE'::text) AND ((typelem = '0'::oid) OR (typlen <> '-1'::integer) OR (typarray <> '0'::oid)))
  • Rows Removed by Filter: 13,575
108. 0.006 0.895 ↑ 15.0 18 1

Hash (cost=119.18..119.18 rows=270 width=4) (actual time=0.895..0.895 rows=18 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
109. 0.670 0.889 ↑ 15.0 18 1

Seq Scan on pg_namespace n_5 (cost=56.70..119.18 rows=270 width=4) (actual time=0.258..0.889 rows=18 loops=1)

  • Filter: ((NOT (hashed SubPlan 2)) AND has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
  • Rows Removed by Filter: 1,608
110.          

SubPlan (for Seq Scan)

111. 0.219 0.219 ↑ 1.2 106 1

Seq Scan on pg_namespace (cost=0.00..56.39 rows=122 width=64) (actual time=0.005..0.219 rows=106 loops=1)

  • Filter: ((NOT nspcompoundtrigger) AND (nspparent <> '0'::oid) AND (nspobjecttype = '0'::oid))
  • Rows Removed by Filter: 1,520
112. 69.735 69.735 ↑ 1.0 1 69,735

Index Scan using pg_class_oid_index on pg_class c_5 (cost=0.29..1.32 rows=1 width=5) (actual time=0.001..0.001 rows=1 loops=69,735)

  • Index Cond: (oid = t_1.typrelid)
113. 0.189 1.323 ↓ 2.0 2 3

Subquery Scan on *SELECT* 12 (cost=57.56..494.14 rows=1 width=0) (actual time=0.176..0.441 rows=2 loops=3)

  • Filter: ((rownum)::numeric < GREATEST('365'::numeric, (fgetdatedifference(to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying), to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) + '1'::numeric)))
114. 0.009 1.134 ↓ 2.0 2 3

Nested Loop (cost=57.56..493.87 rows=1 width=192) (actual time=0.132..0.378 rows=2 loops=3)

115. 0.009 0.825 ↓ 2.0 2 3

Nested Loop Left Join (cost=0.58..436.86 rows=1 width=4) (actual time=0.034..0.275 rows=2 loops=3)

  • Filter: ((c_6.relkind IS NULL) OR (c_6.relkind = 'c'::char))
116. 0.021 0.792 ↑ 6.5 2 3

Nested Loop (cost=0.29..419.50 rows=13 width=8) (actual time=0.027..0.264 rows=2 loops=3)

117. 0.627 0.627 ↑ 1.0 48 3

Seq Scan on pg_namespace pg_namespace_4 (cost=0.00..48.26 rows=48 width=4) (actual time=0.006..0.209 rows=48 loops=3)

  • Filter: (nspbodysrc IS NOT NULL)
  • Rows Removed by Filter: 1,578
118. 0.144 0.144 ↓ 0.0 0 144

Index Scan using pg_type_oid_index on pg_type t_2 (cost=0.29..7.73 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=144)

  • Index Cond: (oid = pg_namespace_4.nspobjecttype)
  • Filter: (has_type_privilege(oid, 'USAGE'::text) AND ((typelem = '0'::oid) OR (typlen <> '-1'::integer) OR (typarray <> '0'::oid)))
119. 0.024 0.024 ↑ 1.0 1 6

Index Scan using pg_class_oid_index on pg_class c_6 (cost=0.29..1.32 rows=1 width=5) (actual time=0.004..0.004 rows=1 loops=6)

  • Index Cond: (oid = t_2.typrelid)
120. 0.079 0.300 ↑ 1.0 1 6

Index Scan using pg_namespace_oid_index on pg_namespace n_6 (cost=56.97..57.01 rows=1 width=4) (actual time=0.050..0.050 rows=1 loops=6)

  • Index Cond: (oid = t_2.typnamespace)
  • Filter: ((NOT (hashed SubPlan 3)) AND has_schema_privilege(oid, 'USAGE'::text) AND (nspname <> ALL ('{pg_catalog,information_schema,pg_toast}'::name[])))
121.          

SubPlan (for Index Scan)

122. 0.221 0.221 ↑ 1.2 106 1

Seq Scan on pg_namespace pg_namespace_1 (cost=0.00..56.39 rows=122 width=64) (actual time=0.007..0.221 rows=106 loops=1)

  • Filter: ((NOT nspcompoundtrigger) AND (nspparent <> '0'::oid) AND (nspobjecttype = '0'::oid))
  • Rows Removed by Filter: 1,520
123.          

SubPlan (for Nested Loop)

124. 4.368 4.368 ↑ 1.0 1 1,092

Seq Scan on dual (cost=0.00..1.03 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=1,092)

125. 0.008 18,910.122 ↓ 16.0 48 1

Append (cost=1.27..75.04 rows=3 width=216) (actual time=35.875..18,910.122 rows=48 loops=1)

126. 0.182 18,909.620 ↓ 24.0 48 1

Nested Loop Anti Join (cost=1.27..41.90 rows=2 width=216) (actual time=35.874..18,909.620 rows=48 loops=1)

127. 0.051 18,909.342 ↓ 24.0 48 1

Nested Loop (cost=0.84..32.52 rows=2 width=192) (actual time=35.842..18,909.342 rows=48 loops=1)

128. 0.061 18,909.195 ↓ 24.0 48 1

Nested Loop (cost=0.42..30.92 rows=2 width=168) (actual time=35.826..18,909.195 rows=48 loops=1)

129. 18,908.990 18,908.990 ↓ 24.0 48 1

CTE Scan on bewegdata tbw (cost=0.00..14.04 rows=2 width=138) (actual time=35.811..18,908.990 rows=48 loops=1)

  • Filter: ((missingdate >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (missingdate <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
  • Rows Removed by Filter: 227
130. 0.144 0.144 ↑ 1.0 1 48

Index Scan using xpkfall on tblfall tf (cost=0.42..8.44 rows=1 width=36) (actual time=0.003..0.003 rows=1 loops=48)

  • Index Cond: (fallid = tbw.fallid)
  • Filter: (stornierer IS NULL)
131. 0.096 0.096 ↑ 1.0 1 48

Index Scan using xpkpatient2 on tblpatient tp (cost=0.42..0.80 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=48)

  • Index Cond: (patientenid = tf.patientenid)
132. 0.096 0.096 ↓ 0.0 0 48

Index Only Scan using xpkeinstufung on tblppreinstufung tppr (cost=0.43..4.45 rows=1 width=15) (actual time=0.002..0.002 rows=0 loops=48)

  • Index Cond: ((fallid = tbw.fallid) AND (datum >= trunc(tbw.missingdate)) AND (datum <= (trunc(tbw.missingdate) + 0.99998842592592592593)))
  • Heap Fetches: 0
133. 0.000 0.494 ↓ 0.0 0 1

Nested Loop (cost=1.26..33.10 rows=1 width=216) (actual time=0.494..0.494 rows=0 loops=1)

134. 0.043 0.494 ↓ 0.0 0 1

Nested Loop Semi Join (cost=0.84..32.29 rows=1 width=168) (actual time=0.494..0.494 rows=0 loops=1)

  • Join Filter: ((tbw_1.fallid = tppr_1.fallid) AND (tppr_1.datum >= trunc(tbw_1.missingdate)) AND (tppr_1.datum <= (trunc(tbw_1.missingdate) + 0.99998842592592592593)))
  • Rows Removed by Join Filter: 24
135. 0.029 0.307 ↓ 24.0 48 1

Nested Loop (cost=0.42..30.92 rows=2 width=174) (actual time=0.115..0.307 rows=48 loops=1)

136. 0.182 0.182 ↓ 24.0 48 1

CTE Scan on bewegdata tbw_1 (cost=0.00..14.04 rows=2 width=138) (actual time=0.095..0.182 rows=48 loops=1)

  • Filter: ((missingdate >= to_date('2020-06-01'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)) AND (missingdate <= to_date('2020-06-25'::character varying, 'YYYY-MM-DD hh24:mi:ss'::character varying)))
  • Rows Removed by Filter: 227
137. 0.096 0.096 ↑ 1.0 1 48

Index Scan using xpkfall on tblfall tf_1 (cost=0.42..8.44 rows=1 width=36) (actual time=0.002..0.002 rows=1 loops=48)

  • Index Cond: (fallid = tbw_1.fallid)
  • Filter: (stornierer IS NULL)
138. 0.144 0.144 ↓ 0.0 0 48

Index Scan using xie3tblppreinstufung on tblppreinstufung tppr_1 (cost=0.42..0.66 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=48)

  • Index Cond: (fallid = tf_1.fallid)
  • Filter: (((allgemeinepflege IS NULL) OR (speziellepflege IS NULL)) AND (basicvalue <> '110'::numeric) AND ((isadmission)::text = 'J'::text))
  • Rows Removed by Filter: 2
139. 0.000 0.000 ↓ 0.0 0

Index Scan using xpkpatient2 on tblpatient tp_1 (cost=0.42..0.80 rows=1 width=36) (never executed)

  • Index Cond: (patientenid = tf_1.patientenid)
Planning time : 21.377 ms
Execution time : 18,911.297 ms