explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ns0s

Settings
# exclusive inclusive rows x rows loops node
1. 2,164.288 2,535.201 ↓ 1.0 200,000 1

Sort (cost=188,781.28..189,278.52 rows=198,896 width=785) (actual time=2,092.086..2,535.201 rows=200,000 loops=1)

  • Sort Key: geomap_deployment.deployment_id
  • Sort Method: external merge Disk: 193728kB
2. 138.846 370.913 ↓ 1.0 200,000 1

Hash Left Join (cost=58.40..32,592.79 rows=198,896 width=785) (actual time=0.232..370.913 rows=200,000 loops=1)

  • Hash Cond: (geomap_deployment.research_project_id = research_researchproject.id)
3. 57.456 232.008 ↓ 1.0 200,000 1

Hash Join (cost=51.13..24,878.30 rows=198,896 width=457) (actual time=0.160..232.008 rows=200,000 loops=1)

  • Hash Cond: (geomap_deployment.owner_id = auth_user.id)
4. 68.851 174.410 ↓ 1.0 200,000 1

Merge Join (cost=15.58..22,107.93 rows=198,896 width=395) (actual time=0.015..174.410 rows=200,000 loops=1)

  • Merge Cond: (geomap_location.id = geomap_deployment.location_id)
5. 20.991 20.991 ↑ 1.0 100,000 1

Index Scan using geomap_location_pkey on geomap_location (cost=0.29..5,758.24 rows=100,000 width=215) (actual time=0.003..20.991 rows=100,000 loops=1)

6. 84.567 84.568 ↑ 1.0 200,000 1

Index Scan using geomap_deployment_location_id_48148634 on geomap_deployment (cost=15.23..13,611.02 rows=200,000 width=180) (actual time=0.009..84.568 rows=200,000 loops=1)

  • Filter: ((owner_id = 1003) OR (hashed SubPlan 1) OR (location_id <= 100000))
7.          

SubPlan (for Index Scan)

8. 0.000 0.001 ↓ 0.0 0 1

Bitmap Heap Scan on geomap_deployment_managers u1 (cost=4.23..14.79 rows=10 width=4) (actual time=0.001..0.001 rows=0 loops=1)

  • Recheck Cond: (user_id = 1003)
9. 0.001 0.001 ↓ 0.0 0 1

Bitmap Index Scan on geomap_deployment_managers_user_id_ba6a7613 (cost=0.00..4.23 rows=10 width=0) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (user_id = 1003)
10. 0.078 0.142 ↑ 1.0 1,002 1

Hash (cost=23.02..23.02 rows=1,002 width=62) (actual time=0.142..0.142 rows=1,002 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 109kB
11. 0.064 0.064 ↑ 1.0 1,002 1

Seq Scan on auth_user (cost=0.00..23.02 rows=1,002 width=62) (actual time=0.002..0.064 rows=1,002 loops=1)

12. 0.029 0.059 ↑ 1.0 101 1

Hash (cost=6.01..6.01 rows=101 width=328) (actual time=0.059..0.059 rows=101 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 45kB
13. 0.030 0.030 ↑ 1.0 101 1

Seq Scan on research_researchproject (cost=0.00..6.01 rows=101 width=328) (actual time=0.002..0.030 rows=101 loops=1)

Planning time : 0.424 ms
Execution time : 2,560.345 ms