explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1Jxf

Settings
# exclusive inclusive rows x rows loops node
1. 0.080 6.733 ↓ 118.0 118 1

Hash Join (cost=24.70..5,787.35 rows=1 width=4) (actual time=1.572..6.733 rows=118 loops=1)

  • Hash Cond: (pm.protocole_id = pp.id)
2. 0.141 6.419 ↑ 2.8 118 1

Nested Loop (cost=1.28..5,762.67 rows=334 width=8) (actual time=1.304..6.419 rows=118 loops=1)

3. 0.025 5.216 ↑ 2.8 118 1

Nested Loop (cost=0.85..5,511.27 rows=334 width=8) (actual time=1.239..5.216 rows=118 loops=1)

4. 3.441 3.441 ↑ 2.5 250 1

Index Scan using prescription_medic_date_debut_idx on prescription_medic pmf (cost=0.43..412.30 rows=636 width=8) (actual time=1.024..3.441 rows=250 loops=1)

  • Index Cond: (date_debut = '2019-09-28'::date)
5. 1.750 1.750 ↓ 0.0 0 250

Index Scan using prescription_source_prescription_id_idx on prescription_source ps (cost=0.43..8.01 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=250)

  • Index Cond: (prescription_id = pmf.id)
  • Filter: ((type_prescription)::text = 'medic'::text)
6. 1.062 1.062 ↑ 1.0 1 118

Index Scan using prescription_medic_pkey on prescription_medic pm (cost=0.43..0.75 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=118)

  • Index Cond: (id = ps.prescription_source_id)
7. 0.083 0.234 ↓ 1.0 553 1

Hash (cost=16.52..16.52 rows=552 width=4) (actual time=0.234..0.234 rows=553 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 28kB
8. 0.151 0.151 ↓ 1.0 553 1

Seq Scan on protocole_prescription pp (cost=0.00..16.52 rows=552 width=4) (actual time=0.009..0.151 rows=553 loops=1)

Planning time : 2.904 ms
Execution time : 6.856 ms