explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OZEl

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 0.984 ↑ 1.0 1 1

Aggregate (cost=420.98..420.99 rows=1 width=8) (actual time=0.983..0.984 rows=1 loops=1)

2. 0.005 0.978 ↑ 1.0 1 1

Limit (cost=1.13..420.97 rows=1 width=48) (actual time=0.974..0.978 rows=1 loops=1)

3. 0.013 0.973 ↑ 4,446.0 1 1

Nested Loop Left Join (cost=1.13..1,866,601.98 rows=4,446 width=48) (actual time=0.972..0.973 rows=1 loops=1)

  • Filter: (COALESCE(pr.center_id, isr.center_id) = ANY ('{0,22}'::integer[]))
  • Rows Removed by Filter: 14
4. 0.043 0.825 ↑ 29,641.3 15 1

Nested Loop Left Join (cost=0.71..1,651,378.98 rows=444,620 width=19) (actual time=0.165..0.825 rows=15 loops=1)

5. 0.026 0.467 ↑ 29,641.3 15 1

Nested Loop (cost=0.28..866,861.82 rows=444,620 width=15) (actual time=0.145..0.467 rows=15 loops=1)

  • Join Filter: ((d.ddept_id)::text = (dd.ddept_id)::text)
  • Rows Removed by Join Filter: 28
6. 0.022 0.426 ↑ 59,282.6 15 1

Nested Loop (cost=0.28..791,592.91 rows=889,239 width=25) (actual time=0.127..0.426 rows=15 loops=1)

7. 0.224 0.224 ↑ 59,282.6 15 1

Seq Scan on tests_prescribed tp (cost=0.00..527,527.45 rows=889,239 width=23) (actual time=0.099..0.224 rows=15 loops=1)

  • Filter: (((priority)::text = ANY ('{S,U}'::text[])) AND ((conducted)::text = 'S'::text))
  • Rows Removed by Filter: 130
8. 0.180 0.180 ↑ 1.0 1 15

Index Scan using diagnostics_pkey on diagnostics d (cost=0.28..0.30 rows=1 width=18) (actual time=0.012..0.012 rows=1 loops=15)

  • Index Cond: ((test_id)::text = (tp.test_id)::text)
9. 0.005 0.015 ↑ 2.0 3 15

Materialize (cost=0.00..1.18 rows=6 width=10) (actual time=0.001..0.001 rows=3 loops=15)

10. 0.010 0.010 ↑ 1.2 5 1

Seq Scan on diagnostics_departments dd (cost=0.00..1.15 rows=6 width=10) (actual time=0.006..0.010 rows=5 loops=1)

  • Filter: ((category)::text = 'DEP_LAB'::text)
  • Rows Removed by Filter: 6
11. 0.315 0.315 ↑ 1.0 1 15

Index Scan using patient_registration_pkey on patient_registration pr (cost=0.43..1.76 rows=1 width=20) (actual time=0.021..0.021 rows=1 loops=15)

  • Index Cond: ((patient_id)::text = (tp.pat_id)::text)
12. 0.135 0.135 ↓ 0.0 0 15

Index Scan using incoming_sample_registration_pkey on incoming_sample_registration isr (cost=0.42..0.47 rows=1 width=13) (actual time=0.009..0.009 rows=0 loops=15)

  • Index Cond: ((tp.pat_id)::text = (incoming_visit_id)::text)
Planning time : 3.852 ms
Execution time : 1.147 ms