explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D8o

Settings
# exclusive inclusive rows x rows loops node
1. 600.972 2,318.107 ↓ 3.2 109,967 1

Sort (cost=45,410.94..45,496.00 rows=34,023 width=280) (actual time=2,206.689..2,318.107 rows=109,967 loops=1)

  • Sort Key: x2."serviceDate
  • Sort Method: quicksort Memory: 32540kB
2. 349.429 1,717.135 ↓ 3.2 109,967 1

HashAggregate (cost=42,509.76..42,849.99 rows=34,023 width=280) (actual time=1,558.136..1,717.135 rows=109,967 loops=1)

  • Group Key: x2.id
3. 286.094 1,367.706 ↓ 3.2 109,967 1

Hash Join (cost=34,737.33..42,424.70 rows=34,023 width=280) (actual time=881.576..1,367.706 rows=109,967 loops=1)

  • Hash Cond: (x2."apptId" = x3.id)
4. 200.197 200.197 ↑ 1.0 153,686 1

Seq Scan on bills x2 (cost=0.00..6,770.86 rows=153,686 width=280) (actual time=0.013..200.197 rows=153,686 loops=1)

5. 110.517 881.415 ↓ 1.1 107,762 1

Hash (cost=33,523.50..33,523.50 rows=97,106 width=16) (actual time=881.414..881.415 rows=107,762 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 6076kB
6. 218.380 770.898 ↓ 1.1 107,762 1

Merge Join (cost=0.70..33,523.50 rows=97,106 width=16) (actual time=0.019..770.898 rows=107,762 loops=1)

  • Merge Cond: (x5.id = x3."assignedDoctorId")
7. 2.941 2.941 ↓ 1.0 446 1

Index Scan using doctors_pkey on doctors x5 (cost=0.28..386.82 rows=437 width=16) (actual time=0.008..2.941 rows=446 loops=1)

  • Filter: ("practiceId" = '5bdaef44-8ff0-439f-99d7-3285afcc6911'::uuid)
  • Rows Removed by Filter: 1541
8. 549.577 549.577 ↑ 2.8 154,652 1

Index Scan using "apptToAssignedDoctorFkIdx" on appts x3 (cost=0.42..263,015.95 rows=438,643 width=32) (actual time=0.007..549.577 rows=154,652 loops=1)

Planning time : 0.623 ms
Execution time : 2,404.916 ms