explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8xY5

Settings
# exclusive inclusive rows x rows loops node
1. 0.029 352.492 ↑ 1.0 50 1

Limit (cost=3,877.38..3,877.51 rows=50 width=121) (actual time=352.459..352.492 rows=50 loops=1)

  • Buffers: shared hit=1,851 read=301
2. 0.377 352.463 ↑ 6.7 50 1

Sort (cost=3,877.38..3,878.22 rows=336 width=121) (actual time=352.458..352.463 rows=50 loops=1)

  • Sort Key: lp.madate DESC
  • Sort Method: top-N heapsort Memory: 48kB
  • Buffers: shared hit=1,851 read=301
3. 0.975 352.086 ↓ 1.3 433 1

Nested Loop (cost=0.85..3,866.22 rows=336 width=121) (actual time=152.246..352.086 rows=433 loops=1)

  • Buffers: shared hit=1,848 read=301
4. 217.355 217.355 ↓ 1.4 476 1

Index Scan using liste_patient_qui_idx on liste_patient lp (cost=0.43..1,179.22 rows=336 width=12) (actual time=152.190..217.355 rows=476 loops=1)

  • Index Cond: (qui = 17)
  • Buffers: shared hit=1 read=287
5. 133.756 133.756 ↑ 1.0 1 476

Index Scan using patient_pkey on patient p (cost=0.42..8.00 rows=1 width=113) (actual time=0.281..0.281 rows=1 loops=476)

  • Index Cond: (id = lp.patient_id)
  • Buffers: shared hit=1,847 read=14
Planning time : 116.607 ms
Execution time : 352.585 ms