explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G6v

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1,946.067 3,573.554 ↑ 1.0 3,515,831 1

Hash Join (cost=59,194.49..444,543.79 rows=3,515,837 width=4) (actual time=884.159..3,573.554 rows=3,515,831 loops=1)

  • Hash Cond: (pp.patientid = p.patient_id)
2. 743.579 743.579 ↑ 1.0 3,515,837 1

Seq Scan on mat_patientprescriptiondata pp (cost=0.00..297,453.37 rows=3,515,837 width=8) (actual time=0.004..743.579 rows=3,515,837 loops=1)

3. 77.198 883.908 ↑ 1.0 364,284 1

Hash (cost=54,639.79..54,639.79 rows=364,376 width=12) (actual time=883.908..883.908 rows=364,284 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 17076kB
4. 326.278 806.710 ↑ 1.0 364,284 1

Hash Right Join (cost=20,758.46..54,639.79 rows=364,376 width=12) (actual time=196.226..806.710 rows=364,284 loops=1)

  • Hash Cond: (pcn.patient_id = p.patient_id)
5. 284.447 284.447 ↓ 1.0 306,274 1

Seq Scan on mst_pm_contact_number pcn (cost=0.00..27,869.51 rows=300,591 width=8) (actual time=0.015..284.447 rows=306,274 loops=1)

  • Filter: (default_contact_number IS TRUE)
  • Rows Removed by Filter: 630629
6. 67.193 195.985 ↑ 1.0 364,284 1

Hash (cost=16,203.76..16,203.76 rows=364,376 width=12) (actual time=195.985..195.985 rows=364,284 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 17076kB
7. 128.792 128.792 ↑ 1.0 364,284 1

Seq Scan on mst_pm_patient p (cost=0.00..16,203.76 rows=364,376 width=12) (actual time=0.004..128.792 rows=364,284 loops=1)

Planning time : 0.485 ms
Execution time : 3,695.530 ms