explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7DhB

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 17.117 ↑ 1.0 1 1

Limit (cost=712.25..712.25 rows=1 width=23) (actual time=17.115..17.117 rows=1 loops=1)

2. 0.020 17.115 ↑ 1.0 1 1

Sort (cost=712.25..712.25 rows=1 width=23) (actual time=17.114..17.115 rows=1 loops=1)

  • Sort Key: (count(1)) DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 0.020 17.095 ↓ 37.0 37 1

GroupAggregate (cost=712.22..712.24 rows=1 width=23) (actual time=17.073..17.095 rows=37 loops=1)

  • Group Key: ad.nama
4. 0.170 17.075 ↓ 124.0 124 1

Sort (cost=712.22..712.22 rows=1 width=15) (actual time=17.069..17.075 rows=124 loops=1)

  • Sort Key: ad.nama
  • Sort Method: quicksort Memory: 32kB
5. 0.126 16.905 ↓ 124.0 124 1

Nested Loop (cost=62.58..712.21 rows=1 width=15) (actual time=1.065..16.905 rows=124 loops=1)

6. 0.638 16.531 ↓ 124.0 124 1

Nested Loop (cost=62.29..711.62 rows=1 width=19) (actual time=1.034..16.531 rows=124 loops=1)

  • Join Filter: (ad.id_anl_dtl_jns_pemeriksaan = a.id)
  • Rows Removed by Join Filter: 4340
7. 0.723 15.645 ↓ 124.0 124 1

Nested Loop (cost=62.29..709.81 rows=1 width=23) (actual time=1.026..15.645 rows=124 loops=1)

  • Join Filter: (ak.id_dtl_kes_abnormal = ad.id)
  • Rows Removed by Join Filter: 7723
8. 9.859 13.858 ↓ 133.0 133 1

Nested Loop (cost=62.29..707.33 rows=1 width=8) (actual time=1.015..13.858 rows=133 loops=1)

  • Join Filter: (upper(p.kesimpulan) ~~* (('%'::text || upper((ak.nama)::text)) || '%'::text))
  • Rows Removed by Join Filter: 549
9. 2.662 3.933 ↓ 11.0 11 1

Hash Join (cost=62.29..704.32 rows=1 width=12) (actual time=0.886..3.933 rows=11 loops=1)

  • Hash Cond: (((p.id_pasien)::text = (d.id_pasien)::text) AND (p.id_kunjungan = d.id_kunjungan))
10. 1.113 1.113 ↑ 1.0 16,151 1

Seq Scan on pasien_kesimpulan p (cost=0.00..480.51 rows=16,151 width=16) (actual time=0.013..1.113 rows=16,151 loops=1)

11. 0.008 0.158 ↓ 2.4 40 1

Hash (cost=62.03..62.03 rows=17 width=14) (actual time=0.158..0.158 rows=40 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
12. 0.003 0.150 ↓ 2.4 40 1

Subquery Scan on d (cost=61.69..62.03 rows=17 width=14) (actual time=0.141..0.150 rows=40 loops=1)

13. 0.006 0.147 ↓ 2.4 40 1

Unique (cost=61.69..61.86 rows=17 width=18) (actual time=0.140..0.147 rows=40 loops=1)

14. 0.053 0.141 ↓ 2.4 40 1

Sort (cost=61.69..61.74 rows=17 width=18) (actual time=0.139..0.141 rows=40 loops=1)

  • Sort Key: a_1.id_pasien, a_1.id_kunjungan, ((a_1.waktu_masuk)::date)
  • Sort Method: quicksort Memory: 28kB
15. 0.088 0.088 ↓ 2.4 40 1

Index Scan using idx_id_kategori_harga on antrian a_1 (cost=0.29..61.35 rows=17 width=18) (actual time=0.022..0.088 rows=40 loops=1)

  • Index Cond: ((id_kategori_harga)::text = '191'::text)
16. 0.066 0.066 ↑ 1.0 62 11

Seq Scan on anl_dtl_kes_persamaan_abnormal ak (cost=0.00..1.62 rows=62 width=21) (actual time=0.002..0.006 rows=62 loops=11)

17. 1.064 1.064 ↑ 1.0 59 133

Seq Scan on anl_dtl_kes_abnormal ad (cost=0.00..1.74 rows=59 width=23) (actual time=0.001..0.008 rows=59 loops=133)

  • Filter: ((sts_post)::text = 'Y'::text)
18. 0.248 0.248 ↑ 1.0 36 124

Seq Scan on anl_dtl_jns_pemeriksaan a (cost=0.00..1.36 rows=36 width=4) (actual time=0.001..0.002 rows=36 loops=124)

19. 0.248 0.248 ↑ 1.0 1 124

Index Only Scan using pasien_pkey on master_pasien m (cost=0.29..0.58 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=124)

  • Index Cond: (id = p.id_pasien)
  • Heap Fetches: 124