explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Lok

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 196,209.998 ↓ 0.0 0 1

GroupAggregate (cost=1,352.05..2,389.13 rows=1 width=136) (actual time=196,209.998..196,209.998 rows=0 loops=1)

  • Group Key: indicator1013msr1.mi_id
  • Buffers: shared hit=91,441,891 read=257
2. 0.003 196,209.993 ↓ 0.0 0 1

Nested Loop (cost=1,352.05..2,389.1 rows=1 width=71) (actual time=196,209.992..196,209.993 rows=0 loops=1)

  • Buffers: shared hit=91,441,891 read=257
3. 0.003 196,209.990 ↓ 0.0 0 1

Nested Loop (cost=1,351.61..2,387.99 rows=2 width=127) (actual time=196,209.989..196,209.99 rows=0 loops=1)

  • Buffers: shared hit=91,441,891 read=257
4. 0.005 196,209.987 ↓ 0.0 0 1

Nested Loop (cost=1,351.05..2,375.38 rows=1 width=171) (actual time=196,209.986..196,209.987 rows=0 loops=1)

  • Buffers: shared hit=91,441,891 read=257
5. 34,086.781 196,209.982 ↓ 0.0 0 1

Nested Loop (cost=1,350.62..2,367.17 rows=1 width=275) (actual time=196,209.982..196,209.982 rows=0 loops=1)

  • Buffers: shared hit=91,441,891 read=257
6. 35,734.763 141,338.823 ↓ 20,784,378.0 20,784,378 1

Nested Loop (cost=1,350.47..2,366.98 rows=1 width=215) (actual time=4.878..141,338.823 rows=20,784,378 loops=1)

  • Buffers: shared hit=70,657,513 read=257
7. 8,207.397 74,510.452 ↓ 2,220,972.0 2,220,972 1

Nested Loop (cost=1,350.05..2,362 rows=1 width=207) (actual time=4.869..74,510.452 rows=2,220,972 loops=1)

  • Buffers: shared hit=44,113,911 read=257
8. 8,663.688 57,168.479 ↓ 2,283,644.0 2,283,644 1

Nested Loop (cost=1,349.61..2,353.79 rows=1 width=199) (actual time=4.857..57,168.479 rows=2,283,644 loops=1)

  • Buffers: shared hit=33,395,741 read=257
9. 9,443.287 39,034.495 ↓ 2,367,574.0 2,367,574 1

Nested Loop (cost=1,349.18..2,345.58 rows=1 width=199) (actual time=4.845..39,034.495 rows=2,367,574 loops=1)

  • Buffers: shared hit=22,208,891 read=257
10. 6,020.501 19,648.592 ↓ 2,485,654.0 2,485,654 1

Nested Loop (cost=1,348.75..2,337.38 rows=1 width=199) (actual time=4.831..19,648.592 rows=2,485,654 loops=1)

  • Buffers: shared hit=10,341,281 read=257
11. 2,975.953 6,645.291 ↓ 1,745,700.0 1,745,700 1

Nested Loop (cost=1,348.32..2,329.19 rows=1 width=136) (actual time=4.819..6,645.291 rows=1,745,700 loops=1)

  • Buffers: shared hit=2,617,819 read=257
12. 356.647 898.346 ↓ 197,928.0 197,928 1

Nested Loop (cost=1,347.89..2,324.21 rows=1 width=104) (actual time=4.804..898.346 rows=197,928 loops=1)

  • Buffers: shared hit=378,999 read=257
13. 41.754 113.587 ↓ 23,784.0 23,784 1

Nested Loop (cost=1,347.47..2,316.48 rows=1 width=104) (actual time=4.794..113.587 rows=23,784 loops=1)

  • Buffers: shared hit=32,675 read=257
14. 6.411 27.374 ↓ 1,933.0 1,933 1

Nested Loop (cost=1,347.04..2,308.74 rows=1 width=78) (actual time=4.784..27.374 rows=1,933 loops=1)

  • Buffers: shared hit=5,983 read=257
15. 1.876 13.241 ↓ 286.0 286 1

Nested Loop (cost=1,346.62..2,300.98 rows=1 width=76) (actual time=4.69..13.241 rows=286 loops=1)

  • Buffers: shared hit=2,400 read=257
16. 1.269 9.613 ↓ 292.0 292 1

Nested Loop (cost=1,346.19..2,292.78 rows=1 width=68) (actual time=4.672..9.613 rows=292 loops=1)

  • Buffers: shared hit=978 read=257
17. 1.154 5.783 ↓ 2.5 197 1

Bitmap Heap Scan on indicator1013msr indicator1013msr1 (cost=1,345.75..1,632.41 rows=78 width=32) (actual time=4.645..5.783 rows=197 loops=1)

  • Heap Blocks: exact=116
  • Buffers: shared hit=110 read=242
18. 0.021 4.629 ↓ 0.0 0 1

BitmapAnd (cost=1,345.75..1,345.75 rows=78 width=0) (actual time=4.628..4.629 rows=0 loops=1)

  • Buffers: shared read=236
19. 0.146 0.146 ↓ 2.2 1,211 1

Bitmap Index Scan on indicator1013msr_mi_id_idx (cost=0..12.6 rows=557 width=0) (actual time=0.145..0.146 rows=1,211 loops=1)

  • Index Cond: (indicator1013msr1.mi_id = '4503599644147978'::bigint)
  • Buffers: shared read=6
20. 4.462 4.462 ↓ 1.0 82,453 1

Bitmap Index Scan on indicator1013msr_code_13012_10003_idx (cost=0..1,332.86 rows=81,714 width=0) (actual time=4.461..4.462 rows=82,453 loops=1)

  • Buffers: shared read=230
21. 2.561 2.561 ↑ 1.0 1 197

Index Scan using attachmentaaptmp_patiid_mid_idx on attachmentaap attachmentaap2 (cost=0.43..8.46 rows=1 width=36) (actual time=0.01..0.013 rows=1 loops=197)

  • Index Cond: ((attachmentaap2.patient_ident_id = indicator1013msr1.pat_id) AND (attachmentaap2.mi_id = '4503599644147978'::bigint))
  • Filter: (attachmentaap2.hw_specialization = ANY ('{1,16,31}'::text[]))
  • Buffers: shared hit=868 read=15
22. 1.752 1.752 ↓ 2.0 2 292

Index Scan using attachmentaaptmp_patiid_mid_idx on attachmentaap attachmentaap1 (cost=0.43..8.17 rows=1 width=36) (actual time=0.003..0.006 rows=2 loops=292)

  • Index Cond: ((attachmentaap1.patient_ident_id = attachmentaap2.patient_ident_id) AND (attachmentaap1.mi_id = '4503599644147978'::bigint))
  • Filter: (attachmentaap1.hw_specialization = ANY ('{1,16,31}'::text[]))
  • Buffers: shared hit=1,422
23. 7.722 7.722 ↓ 11.0 11 286

Index Scan using indicator1013msr_pat_id_idx on indicator1013msr indicator1013msr2 (cost=0.42..7.72 rows=1 width=38) (actual time=0.006..0.027 rows=11 loops=286)

  • Index Cond: (indicator1013msr2.pat_id = attachmentaap1.patient_ident_id)
  • Filter: ((indicator1013msr2.mi_id = '4503599644147978'::bigint) AND (indicator1013msr2.measurement_code = ANY ('{01050,00036,01053}'::text[])))
  • Buffers: shared hit=3,583
24. 44.459 44.459 ↓ 12.0 12 1,933

Index Scan using indicator1013msr_pat_id_idx on indicator1013msr indicator1013msr3 (cost=0.42..7.72 rows=1 width=38) (actual time=0.003..0.023 rows=12 loops=1,933)

  • Index Cond: (indicator1013msr3.pat_id = attachmentaap1.patient_ident_id)
  • Filter: ((indicator1013msr3.mi_id = '4503599644147978'::bigint) AND (indicator1013msr3.measurement_code = ANY ('{01050,00036,01054}'::text[])))
  • Buffers: shared hit=26,692
25. 428.112 428.112 ↓ 8.0 8 23,784

Index Scan using indicator1013msr_pat_id_idx on indicator1013msr indicator1013msr4 (cost=0.42..7.71 rows=1 width=32) (actual time=0.004..0.018 rows=8 loops=23,784)

  • Index Cond: (indicator1013msr4.pat_id = attachmentaap1.patient_ident_id)
  • Filter: ((indicator1013msr4.mi_id = '4503599644147978'::bigint) AND (indicator1013msr4.measurement_code = '10028'::text))
  • Buffers: shared hit=346,324
26. 2,770.992 2,770.992 ↓ 9.0 9 197,928

Index Scan using indicator1013prctmp_pat_id_idx on indicator1013prc indicator1013prc1 (cost=0.42..4.97 rows=1 width=32) (actual time=0.003..0.014 rows=9 loops=197,928)

  • Index Cond: (indicator1013prc1.pat_id = attachmentaap1.patient_ident_id)
  • Filter: ((indicator1013prc1.mi_id = '4503599644147978'::bigint) AND (indicator1013prc1.procedure_code = '10029'::text))
  • Buffers: shared hit=2,238,820
27. 6,982.800 6,982.800 ↑ 1.0 1 1,745,700

Index Scan using attachmentaaptmp_patiid_mid_idx on attachmentaap attachmentaap7 (cost=0.43..8.18 rows=1 width=71) (actual time=0.002..0.004 rows=1 loops=1,745,700)

  • Index Cond: ((attachmentaap7.patient_ident_id = attachmentaap1.patient_ident_id) AND (attachmentaap7.mi_id = '4503599644147978'::bigint))
  • Filter: (('2020-12-31'::date >= (attachmentaap7.enrl_register_date)::date) AND ((attachmentaap7.enrl_unregister_date IS NULL) OR ('2020-01-01'::date < (attachmentaap7.enrl_unregister_date)::date)) AND ((attachmentaap7.patient_birthday + '18 years'::interval) <= '2020-12-31 00:00:00'::timestamp without time zone))
  • Buffers: shared hit=7,723,462
28. 9,942.616 9,942.616 ↓ 2.0 2 2,485,654

Index Scan using attachmentaaptmp_patiid_mid_idx on attachmentaap attachmentaap3 (cost=0.43..8.17 rows=1 width=36) (actual time=0.002..0.004 rows=2 loops=2,485,654)

  • Index Cond: ((attachmentaap3.patient_ident_id = attachmentaap1.patient_ident_id) AND (attachmentaap3.mi_id = '4503599644147978'::bigint))
  • Filter: (attachmentaap3.hw_specialization = ANY ('{1,16,31}'::text[]))
  • Buffers: shared hit=11,867,610
29. 9,470.296 9,470.296 ↓ 2.0 2 2,367,574

Index Scan using attachmentaaptmp_patiid_mid_idx on attachmentaap attachmentaap4 (cost=0.43..8.17 rows=1 width=36) (actual time=0.002..0.004 rows=2 loops=2,367,574)

  • Index Cond: ((attachmentaap4.patient_ident_id = attachmentaap1.patient_ident_id) AND (attachmentaap4.mi_id = '4503599644147978'::bigint))
  • Filter: (attachmentaap4.hw_specialization = ANY ('{1,16,31}'::text[]))
  • Buffers: shared hit=11,186,850
30. 9,134.576 9,134.576 ↓ 2.0 2 2,283,644

Index Scan using attachmentaaptmp_patiid_mid_idx on attachmentaap attachmentaap5 (cost=0.43..8.17 rows=1 width=36) (actual time=0.002..0.004 rows=2 loops=2,283,644)

  • Index Cond: ((attachmentaap5.patient_ident_id = attachmentaap1.patient_ident_id) AND (attachmentaap5.mi_id = '4503599644147978'::bigint))
  • Filter: (attachmentaap5.hw_specialization = ANY ('{1,16,31}'::text[]))
  • Buffers: shared hit=10,718,170
31. 31,093.608 31,093.608 ↓ 9.0 9 2,220,972

Index Scan using indicator1013prctmp_pat_id_idx on indicator1013prc indicator1013prc2 (cost=0.42..4.97 rows=1 width=32) (actual time=0.002..0.014 rows=9 loops=2,220,972)

  • Index Cond: (indicator1013prc2.pat_id = attachmentaap1.patient_ident_id)
  • Filter: ((indicator1013prc2.mi_id = '4503599644147978'::bigint) AND (indicator1013prc2.procedure_code = '10030'::text))
  • Buffers: shared hit=26,543,602
32. 20,784.378 20,784.378 ↓ 0.0 0 20,784,378

Index Scan using mvpathissues13aap_pat_id_idx on mvpathissues13aap mvpathissues13aap1 (cost=0.15..0.18 rows=1 width=60) (actual time=0.001..0.001 rows=0 loops=20,784,378)

  • Index Cond: (mvpathissues13aap1.pat_id = attachmentaap1.patient_ident_id)
  • Filter: (('2020-12-31'::date >= (mvpathissues13aap1.hi_start_date)::date) AND ((mvpathissues13aap1.hi_end_date IS NULL) OR ('2020-01-01'::date <= (mvpathissues13aap1.hi_end_date)::date)))
  • Buffers: shared hit=20,784,378
33. 0.000 0.000 ↓ 0.0 0 0

Index Scan using attachmentaaptmp_patiid_mid_idx on attachmentaap attachmentaap6 (cost=0.43..8.17 rows=1 width=36) (never executed)

  • Index Cond: ((attachmentaap6.patient_ident_id = attachmentaap1.patient_ident_id) AND (attachmentaap6.mi_id = '4503599644147978'::bigint))
  • Filter: (attachmentaap6.hw_specialization = ANY ('{1,16,31}'::text[]))
34. 0.000 0.000 ↓ 0.0 0 0

Index Scan using mvvisitshissues_s_hi_uuid_idx on mvvisitshissues mvvisitshissues1 (cost=0.56..12.6 rows=2 width=59) (never executed)

  • Index Cond: ((mvvisitshissues1.hi_uuid)::text = (mvpathissues13aap1.hi_id)::text)
35. 0.000 0.000 ↓ 0.0 0 0

Index Scan using visitslistmv_n_visit_id_idx1 on visitslistmv visitslistmv1 (cost=0.43..0.5 rows=1 width=16) (never executed)

  • Index Cond: (visitslistmv1.visit_id = mvvisitshissues1.visit_id)
Planning time : 64.588 ms
Execution time : 196,210.54 ms