explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XvPJ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=457.34..461.38 rows=1,617 width=108) (actual rows= loops=)

  • Sort Key: pv.created_at DESC
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=97.18..371.16 rows=1,617 width=108) (actual rows= loops=)

  • Hash Cond: (pv.item_id = prescriptions.id)
3. 0.000 0.000 ↓ 0.0

Seq Scan on prescription_versions pv (cost=0.00..185.71 rows=3,056 width=689) (actual rows= loops=)

  • Filter: (annotated_type IS NOT NULL)
4. 0.000 0.000 ↓ 0.0

Hash (cost=86.75..86.75 rows=835 width=12) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=43.91..86.75 rows=835 width=12) (actual rows= loops=)

  • Hash Cond: (prescriptions.patient_id = patients.id)
6. 0.000 0.000 ↓ 0.0

Seq Scan on prescriptions (cost=0.00..31.35 rows=835 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=40.13..40.13 rows=303 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=32.95..40.13 rows=303 width=8) (actual rows= loops=)

  • Hash Cond: (patients.group_id = groups.id)
9. 0.000 0.000 ↓ 0.0

Seq Scan on patients (cost=0.00..6.03 rows=303 width=12) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=20.20..20.20 rows=1,020 width=4) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on groups (cost=0.00..20.20 rows=1,020 width=4) (actual rows= loops=)