explain.depesz.com

PostgreSQL's explain analyze made readable

Result: N6AU : 123

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 26.167 ↓ 3.8 23 1

Merge Right Join (cost=1,050.67..1,090.17 rows=6 width=24) (actual time=26.145..26.167 rows=23 loops=1)

  • Merge Cond: (m.mo_contract_id = m_1.id)
2. 4.271 26.089 ↑ 17.1 158 1

Sort (cost=1,042.36..1,049.12 rows=2,707 width=16) (actual time=26.065..26.089 rows=158 loops=1)

  • Sort Key: m.mo_contract_id, m.id
  • Sort Method: quicksort Memory: 444kB
3. 2.842 21.818 ↓ 2.0 5,357 1

Hash Join (cost=567.83..888.02 rows=2,707 width=16) (actual time=11.927..21.818 rows=5,357 loops=1)

  • Hash Cond: (mgu.mogu_gps_unit_id = gu.id)
4. 3.045 13.268 ↓ 1.5 5,357 1

Hash Join (cost=299.50..578.94 rows=3,649 width=24) (actual time=6.146..13.268 rows=5,357 loops=1)

  • Hash Cond: (mgu.mogu_mobject_id = m.id)
5. 4.165 4.165 ↓ 1.0 5,357 1

Seq Scan on uzgps_mobject_gps_units mgu (cost=0.00..223.11 rows=5,291 width=16) (actual time=0.011..4.165 rows=5,357 loops=1)

  • Filter: ((mogu_status)::text = 'A'::text)
  • Rows Removed by Filter: 2861
6. 1.768 6.058 ↓ 1.0 5,370 1

Hash (cost=232.76..232.76 rows=5,339 width=16) (actual time=6.058..6.058 rows=5,370 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 316kB
7. 4.290 4.290 ↓ 1.0 5,370 1

Seq Scan on uzgps_mobject m (cost=0.00..232.76 rows=5,339 width=16) (actual time=0.010..4.290 rows=5,370 loops=1)

  • Filter: ((mo_status)::text = 'A'::text)
  • Rows Removed by Filter: 2371
8. 1.640 5.708 ↓ 1.0 5,462 1

Hash (cost=200.48..200.48 rows=5,428 width=8) (actual time=5.708..5.708 rows=5,462 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 278kB
9. 4.068 4.068 ↓ 1.0 5,462 1

Seq Scan on uzgps_gps_unit gu (cost=0.00..200.48 rows=5,428 width=8) (actual time=0.015..4.068 rows=5,462 loops=1)

  • Filter: ((gu_status)::text = 'A'::text)
  • Rows Removed by Filter: 1856
10. 0.006 0.044 ↑ 1.0 1 1

Materialize (cost=8.32..8.32 rows=1 width=8) (actual time=0.036..0.044 rows=1 loops=1)

11. 0.016 0.038 ↑ 1.0 1 1

Sort (cost=8.32..8.32 rows=1 width=8) (actual time=0.032..0.038 rows=1 loops=1)

  • Sort Key: m_1.id
  • Sort Method: quicksort Memory: 25kB
12. 0.022 0.022 ↑ 1.0 1 1

Index Scan using uzgps_contract_pkey on uzgps_contract m_1 (cost=0.28..8.30 rows=1 width=8) (actual time=0.021..0.022 rows=1 loops=1)

  • Index Cond: (id = 12)
  • Filter: ((c_status)::text = 'A'::text)