explain.depesz.com

PostgreSQL's explain analyze made readable

Result: I57C

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

Limit (cost=860,629.48..860,629.73 rows=100 width=520) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=860,629.48..892,027.80 rows=12,559,328 width=520) (actual rows= loops=)

  • Sort Key: backoffice_event."time" DESC, backoffice_event.id DESC
3. 0.000 0.000 ↓ 0.0

Hash Join (cost=35.82..380,621.00 rows=12,559,328 width=520) (actual rows= loops=)

  • Hash Cond: (backoffice_location.install_owner_id = auth_user.id)
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=28.69..346,640.43 rows=12,559,328 width=380) (actual rows= loops=)

  • Hash Cond: (backoffice_location.person_id = backoffice_person.id)
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=24.87..312,523.11 rows=12,559,328 width=253) (actual rows= loops=)

  • Hash Cond: (backoffice_sensor.location_id = backoffice_location.id)
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=19.13..278,403.87 rows=12,559,328 width=105) (actual rows= loops=)

  • Hash Cond: (backoffice_event.sensor_id = backoffice_sensor.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on backoffice_event (cost=0.00..245,157.28 rows=12,559,328 width=45) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=12.39..12.39 rows=539 width=60) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on backoffice_sensor (cost=0.00..12.39 rows=539 width=60) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=4.22..4.22 rows=122 width=148) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on backoffice_location (cost=0.00..4.22 rows=122 width=148) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=2.81..2.81 rows=81 width=127) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on backoffice_person (cost=0.00..2.81 rows=81 width=127) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=5.39..5.39 rows=139 width=140) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on auth_user (cost=0.00..5.39 rows=139 width=140) (actual rows= loops=)