explain.depesz.com

PostgreSQL's explain analyze made readable

Result: H04E

Settings
# exclusive inclusive rows x rows loops node
1. 641.624 803.640 ↓ 0.0 0 1

Gather (cost=1,632.77..5,651.17 rows=1 width=4) (actual time=803.483..803.640 rows=0 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
2. 0.000 162.016 ↓ 0.0 0 5 / 5

Nested Loop (cost=632.77..4,651.07 rows=1 width=4) (actual time=162.016..162.016 rows=0 loops=5)

3. 4.042 34.272 ↓ 304.2 25,859 5 / 5

Nested Loop (cost=632.34..4,586.88 rows=85 width=4) (actual time=1.450..34.272 rows=25,859 loops=5)

4. 0.293 1.614 ↑ 5.8 28 5 / 5

Merge Join (cost=631.91..915.83 rows=162 width=4) (actual time=1.397..1.614 rows=28 loops=5)

  • Merge Cond: (pm.protocole_id = pp.id)
5. 1.227 1.227 ↑ 535.5 823 5 / 5

Parallel Index Scan using prescription_medic_protocole_idx on prescription_medic pm (cost=0.43..281,464.02 rows=440,677 width=8) (actual time=0.047..1.227 rows=823 loops=5)

6. 0.037 0.094 ↓ 1.4 89 3 / 5

Sort (cost=18.49..18.65 rows=64 width=4) (actual time=0.136..0.156 rows=89 loops=3)

  • Sort Key: pp.id
  • Sort Method: quicksort Memory: 28kB
7. 0.037 0.057 ↑ 1.0 64 3 / 5

Bitmap Heap Scan on protocole_prescription pp (cost=4.77..16.57 rows=64 width=4) (actual time=0.044..0.095 rows=64 loops=3)

  • Recheck Cond: (type_protocole_id = 6)
  • Heap Blocks: exact=10
8. 0.020 0.020 ↑ 1.0 64 3 / 5

Bitmap Index Scan on protocole_prescription_type_protocole_id_idx (cost=0.00..4.76 rows=64 width=0) (actual time=0.033..0.033 rows=64 loops=3)

  • Index Cond: (type_protocole_id = 6)
9. 28.616 28.616 ↓ 1.2 924 140 / 5

Index Scan using prescription_source_ps_id_type_idx on prescription_source ps (cost=0.43..15.26 rows=740 width=8) (actual time=0.007..1.022 rows=924 loops=140)

  • Index Cond: ((prescription_source_id = pm.id) AND ((type_prescription)::text = 'medic'::text))
10. 129.294 129.294 ↓ 0.0 0 129,294 / 5

Index Scan using prescription_medic_pkey on prescription_medic pmf (cost=0.43..0.76 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=129,294)

  • Index Cond: (id = ps.prescription_id)
  • Filter: (date_debut = '2019-09-28'::date)
  • Rows Removed by Filter: 1
Planning time : 1.292 ms
Execution time : 803.741 ms