explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fPBp

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 148.371 ↑ 1.0 1 1

Limit (cost=3,683.93..84,003.28 rows=1 width=7,525) (actual time=148.370..148.371 rows=1 loops=1)

2. 0.009 148.368 ↑ 1.0 1 1

Nested Loop Left Join (cost=3,683.93..84,003.28 rows=1 width=7,525) (actual time=148.368..148.368 rows=1 loops=1)

3. 0.171 148.358 ↑ 1.0 1 1

Nested Loop Left Join (cost=3,683.51..84,002.79 rows=1 width=7,485) (actual time=148.358..148.358 rows=1 loops=1)

  • Join Filter: (i.caseinfoid = iv.caseinfoid)
  • Rows Removed by Join Filter: 1,417
4. 0.012 80.539 ↑ 1.0 1 1

Nested Loop Left Join (cost=3,148.64..75,847.31 rows=1 width=6,720) (actual time=80.539..80.539 rows=1 loops=1)

  • Join Filter: ((ao.badgenumber = sa.reportingofficerbadge) AND (ao.username = i.reportingofficer))
  • Rows Removed by Join Filter: 45
5. 0.013 80.501 ↑ 1.0 1 1

Nested Loop Left Join (cost=3,148.64..75,821.17 rows=1 width=6,413) (actual time=80.501..80.501 rows=1 loops=1)

  • Join Filter: (cb.userid = sa.createby)
  • Rows Removed by Join Filter: 46
6. 0.053 80.483 ↑ 1.0 1 1

Nested Loop Left Join (cost=3,148.64..75,795.99 rows=1 width=6,106) (actual time=80.483..80.483 rows=1 loops=1)

  • Join Filter: (ub.userid = sa.lastmodby)
  • Rows Removed by Join Filter: 210
7. 0.879 80.383 ↑ 1.0 1 1

Nested Loop (cost=3,148.64..75,770.82 rows=1 width=5,799) (actual time=80.383..80.383 rows=1 loops=1)

  • Join Filter: (a.caseinfoid = i.caseinfoid)
  • Rows Removed by Join Filter: 6,567
8. 0.077 76.294 ↑ 1.0 1 1

Hash Join (cost=3,148.64..72,555.48 rows=1 width=4,032) (actual time=76.294..76.294 rows=1 loops=1)

  • Hash Cond: (p.personid = sa.personid)
9. 0.009 0.009 ↑ 133,466.6 11 1

Seq Scan on rms_persons p (cost=0.00..63,901.33 rows=1,468,133 width=3,180) (actual time=0.003..0.009 rows=11 loops=1)

10. 18.474 76.208 ↓ 10,383.0 10,383 1

Hash (cost=3,148.63..3,148.63 rows=1 width=852) (actual time=76.208..76.208 rows=10,383 loops=1)

  • Buckets: 8,192 (originally 1024) Batches: 4 (originally 1) Memory Usage: 1,985kB
11. 17.616 57.734 ↓ 10,383.0 10,383 1

Hash Join (cost=2,664.50..3,148.63 rows=1 width=852) (actual time=35.682..57.734 rows=10,383 loops=1)

  • Hash Cond: ((a.caseinfoid = sa.caseinfoid) AND (a.caseformid = sa.caseformid))
12. 4.524 4.524 ↑ 1.0 10,405 1

Seq Scan on rms_xref_incident_arrest a (cost=0.00..406.08 rows=10,405 width=187) (actual time=0.027..4.524 rows=10,405 loops=1)

  • Filter: (rms_xref_incident_arrest_zid <> 758)
  • Rows Removed by Filter: 1
13. 13.646 35.594 ↓ 5.7 10,372 1

Hash (cost=2,637.10..2,637.10 rows=1,827 width=665) (actual time=35.594..35.594 rows=10,372 loops=1)

  • Buckets: 8,192 (originally 2048) Batches: 2 (originally 1) Memory Usage: 1,985kB
14. 11.689 21.948 ↓ 5.7 10,372 1

Hash Join (cost=1,742.20..2,637.10 rows=1,827 width=665) (actual time=8.188..21.948 rows=10,372 loops=1)

  • Hash Cond: (sa.rms_xref_incident_suspectarrest_zid = pt_cn.convertedid)
15. 2.143 2.143 ↑ 1.0 10,375 1

Seq Scan on rms_xref_incident_suspectarrest sa (cost=0.00..759.91 rows=10,375 width=600) (actual time=0.003..2.143 rows=10,375 loops=1)

  • Filter: ((z_rank_arrest IS NULL) OR (z_rank_arrest = 1))
  • Rows Removed by Filter: 18
16. 2.208 8.116 ↓ 1.0 10,390 1

Hash (cost=1,613.10..1,613.10 rows=10,328 width=65) (actual time=8.116..8.116 rows=10,390 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 1,113kB
17. 5.908 5.908 ↓ 1.0 10,390 1

Index Scan using dce_pt_casesnames_unique_convertedid_wtrun_idx on pt_casesnames pt_cn (cost=0.29..1,613.10 rows=10,328 width=65) (actual time=0.017..5.908 rows=10,390 loops=1)

  • Index Cond: (wtrun = 103)
18. 3.210 3.210 ↑ 1.9 6,568 1

Seq Scan on rms_incident i (cost=0.00..3,058.41 rows=12,554 width=1,767) (actual time=0.005..3.210 rows=6,568 loops=1)

  • Filter: ((z_rank_dup_incidents_arrestee = '1'::text) OR (z_rank_dup_incidents_arrestee IS NULL))
  • Rows Removed by Filter: 10
19. 0.047 0.047 ↑ 1.1 211 1

Seq Scan on rms_users ub (cost=0.00..22.30 rows=230 width=307) (actual time=0.012..0.047 rows=211 loops=1)

20. 0.005 0.005 ↑ 4.9 47 1

Seq Scan on rms_users cb (cost=0.00..22.30 rows=230 width=307) (actual time=0.001..0.005 rows=47 loops=1)

21. 0.026 0.026 ↑ 4.7 46 1

Seq Scan on rms_users ao (cost=0.00..22.88 rows=218 width=307) (actual time=0.003..0.026 rows=46 loops=1)

  • Filter: (z_rank = 1)
  • Rows Removed by Filter: 1
22. 40.960 67.648 ↓ 1.0 1,417 1

Hash Right Join (cost=534.87..8,138.18 rows=1,384 width=765) (actual time=3.626..67.648 rows=1,417 loops=1)

  • Hash Cond: (v.vehicleid = iv.vehicleid)
23. 23.081 23.081 ↑ 1.0 276,834 1

Seq Scan on rms_vehicle v (cost=0.00..6,551.34 rows=276,834 width=486) (actual time=0.003..23.081 rows=276,834 loops=1)

24. 0.191 3.607 ↓ 1.0 1,417 1

Hash (cost=517.57..517.57 rows=1,384 width=279) (actual time=3.607..3.607 rows=1,417 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 244kB
25. 3.416 3.416 ↓ 1.0 1,417 1

Seq Scan on rms_xref_incident_vehicle iv (cost=0.00..517.57 rows=1,384 width=279) (actual time=0.018..3.416 rows=1,417 loops=1)

  • Filter: (("position" = 1) AND (vehiclenumber = 1) AND (rms_xref_incident_vehicle_zid <> ALL ('{95,713,1033,2487,3983}'::bigint[])))
  • Rows Removed by Filter: 11,645
26. 0.001 0.001 ↓ 0.0 0 1

Index Scan using ptvehicles_convertedid_wtrun_idx on pt_vehicles pt_v (cost=0.42..0.48 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: ((convertedid = v.rms_vehicle_zid) AND (wtrun = 301))
Planning time : 26.064 ms
Execution time : 151.097 ms