explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fMN

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

Unique (cost=23,743,535.47..25,783,439.91 rows=50,997,611 width=124) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=23,743,535.47..23,871,029.50 rows=50,997,611 width=124) (actual rows= loops=)

  • Sort Key: challans.id, challans.remark, challans.challan_no, challans.challan_doc_no, challans.date_time, challans.challan_place, challans.ac
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,665,981.67..14,849,227.60 rows=50,997,611 width=124) (actual rows= loops=)

  • Hash Cond: (challans.officer_id = users.id)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=3,659,071.98..14,585,358.66 rows=20,793,215 width=113) (actual rows= loops=)

  • Hash Cond: (challans.id = challan_status.challan_id)
5. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=3,096,225.67..12,769,791.32 rows=18,141,057 width=104) (actual rows= loops=)

  • Hash Cond: ((challan_accused.challan_id = challans.id) AND ((challan_accused.type)::text = (challans.accused_type)::text))
6. 0.000 0.000 ↓ 0.0

Seq Scan on challan_accused (cost=0.00..8,243,307.42 rows=61,543,472 width=25) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=2,685,358.21..2,685,358.21 rows=18,141,057 width=90) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on challans (cost=0.00..2,685,358.21 rows=18,141,057 width=90) (actual rows= loops=)

  • Filter: (is_active = 1)
9. 0.000 0.000 ↓ 0.0

Hash (cost=346,217.46..346,217.46 rows=20,864,154 width=13) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on challan_status (cost=0.00..346,217.46 rows=20,864,154 width=13) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=6,410.10..6,410.10 rows=90,835 width=11) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=138.45..6,410.10 rows=90,835 width=11) (actual rows= loops=)

  • Merge Cond: ((users.location)::text = (((rto.id)::character varying)::text))
13. 0.000 0.000 ↓ 0.0

Index Scan using users_location_idx on users (cost=0.29..4,813.31 rows=37,036 width=8) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Sort (cost=138.16..143.11 rows=1,977 width=7) (actual rows= loops=)

  • Sort Key: (((rto.id)::character varying)::text)
15. 0.000 0.000 ↓ 0.0

Seq Scan on rto (cost=0.00..29.93 rows=1,977 width=7) (actual rows= loops=)