explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xf1f

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.071 ↑ 1.0 1 1

Nested Loop (cost=0.49..8.52 rows=1 width=4) (actual time=0.070..0.071 rows=1 loops=1)

2. 0.009 0.029 ↑ 1.0 1 1

HashAggregate (cost=0.07..0.08 rows=1 width=16) (actual time=0.028..0.029 rows=1 loops=1)

  • Group Key: ("ANY_subquery".patient_id)::text
3. 0.002 0.020 ↑ 1.0 1 1

Subquery Scan on ANY_subquery (cost=0.00..0.07 rows=1 width=16) (actual time=0.018..0.020 rows=1 loops=1)

4. 0.003 0.018 ↑ 1.0 1 1

Limit (cost=0.00..0.06 rows=1 width=16) (actual time=0.016..0.018 rows=1 loops=1)

5. 0.015 0.015 ↑ 999,136.0 1 1

Seq Scan on patient_registration two (cost=0.00..55,740.36 rows=999,136 width=16) (actual time=0.014..0.015 rows=1 loops=1)

6. 0.037 0.037 ↑ 1.0 1 1

Index Only Scan using patient_registration_pkey on patient_registration one (cost=0.42..8.44 rows=1 width=16) (actual time=0.037..0.037 rows=1 loops=1)

  • Index Cond: (patient_id = ("ANY_subquery".patient_id)::text)
  • Heap Fetches: 1
Planning time : 0.805 ms
Execution time : 0.145 ms