explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JHcv

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

Aggregate (cost=2.24..2.25 rows=1 width=8) (actual time=0.111..0.111 rows=1 loops=1)

2. 0.005 0.106 ↑ 1.0 1 1

Limit (cost=0.28..2.23 rows=1 width=48) (actual time=0.103..0.106 rows=1 loops=1)

3. 0.003 0.101 ↑ 444,620.0 1 1

Nested Loop (cost=0.28..866,861.82 rows=444,620 width=48) (actual time=0.101..0.101 rows=1 loops=1)

  • Join Filter: ((d.ddept_id)::text = (dd.ddept_id)::text)
  • Rows Removed by Join Filter: 4
4. 0.002 0.058 ↑ 889,239.0 1 1

Nested Loop (cost=0.28..791,592.91 rows=889,239 width=10) (actual time=0.058..0.058 rows=1 loops=1)

5. 0.036 0.036 ↑ 889,239.0 1 1

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

  • Filter: (((priority)::text = ANY ('{S,U}'::text[])) AND ((conducted)::text = 'S'::text))
6. 0.020 0.020 ↑ 1.0 1 1

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

  • Index Cond: ((test_id)::text = (tp.test_id)::text)
7. 0.030 0.040 ↑ 1.2 5 1

Materialize (cost=0.00..1.18 rows=6 width=10) (actual time=0.033..0.040 rows=5 loops=1)

8. 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.005..0.010 rows=5 loops=1)

  • Filter: ((category)::text = 'DEP_LAB'::text)
  • Rows Removed by Filter: 6
Planning time : 1.822 ms
Execution time : 0.200 ms