explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4iQI

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

nique (cost=24.38..27.02 rows=13 width=3,195) (actual time=0.200..0.200 rows=0 loops=1)

2. 0.129 0.200 ↓ 0.0 0 1

Sort (cost=24.38..24.42 rows=13 width=3,195) (actual time=0.200..0.200 rows=0 loops=1)

  • Sort Key: users.id, users.password, users.last_login, users.is_superuser, users.first_name, users.last_name, users.email, users.phone, users.photo, users.salesforce_data, users.is_staff, users.is_active, users.created, users.updated, users.webhook_id, users.nickname, users.about, users.note, users.bio, users.in_blacklist, users.subscribe, users.birthday, users.country, users.city, users.occupation, (max(rooms_reservations.end_date)), (max((rooms.system_name)::text)), lead_lead.id, lead_lead.created, lead_lead.modified, lead_lead.session_key, lead_lead.web_source, lead_lead.source_id, lead_lead.request_for_package, lead_lead.status, lead_lead.status_changed, lead_lead.status_group, lead_lead.lost_note, lead_lead.from_june_os, lead_lead.first_name, lead_lead.last_name, lead_lead.phone, lead_lead.email, lead_lead.emails_secondary, lead_lead.email_consent, lead_lead.residence_id, lead_lead.price_from, lead_lead.price_to, lead_lead.move_in_from, lead_lead.city_id, lead_lead.move_out, lead_lead.home_type, lead_lead.from_smartform, lead_lead.from_sales_force, lead_lead.from_sign_up, lead_lead.from_social_network_sign_up, lead_lead.salesforce_id, lead_lead.salesforce_status, lead_lead.room_id, lead_lead.created_by_id, lead_lead.updated_by_id, lead_lead.landing_page_url, lead_lead.http_referer, lead_lead.utm_source, lead_lead.utm_medium, lead_lead.utm_campaign, lead_lead.gclid, lead_lead.fbclid, lead_lead.ga, lead_lead.gid, lead_lead.user_id, lead_lead.owner_id, lead_lead.parent_id, lead_lead.note, lead_lead.background_check_report_member1, lead_lead.background_check_report_member2, lead_lead.background_check_report_guarantor1, lead_lead.background_check_report_guarantor2, lead_lead.marketing_inquired_room_id, lead_lead.marketing_facebook_ad_id
  • Sort Method: quicksort Memory: 25kB
3. 0.000 0.071 ↓ 0.0 0 1

HashAggregate (cost=24.01..24.14 rows=13 width=3,195) (actual time=0.071..0.071 rows=0 loops=1)

  • Group Key: users.id, lead_lead.id
4. 0.001 0.071 ↓ 0.0 0 1

Nested Loop Left Join (cost=10.44..23.88 rows=13 width=3,184) (actual time=0.071..0.071 rows=0 loops=1)

5. 0.000 0.070 ↓ 0.0 0 1

Nested Loop (cost=10.16..21.70 rows=1 width=2,902) (actual time=0.070..0.070 rows=0 loops=1)

6. 0.000 0.070 ↓ 0.0 0 1

Nested Loop (cost=10.02..21.50 rows=1 width=2,970) (actual time=0.070..0.070 rows=0 loops=1)

7. 0.000 0.070 ↓ 0.0 0 1

Nested Loop (cost=9.88..21.30 rows=1 width=2,966) (actual time=0.070..0.070 rows=0 loops=1)

8. 0.000 0.070 ↓ 0.0 0 1

Nested Loop (cost=9.74..21.10 rows=1 width=2,962) (actual time=0.070..0.070 rows=0 loops=1)

9. 0.001 0.070 ↓ 0.0 0 1

Nested Loop (cost=9.60..20.90 rows=1 width=2,958) (actual time=0.070..0.070 rows=0 loops=1)

10. 0.000 0.069 ↓ 0.0 0 1

Nested Loop (cost=9.46..20.70 rows=1 width=2,954) (actual time=0.069..0.069 rows=0 loops=1)

11. 0.000 0.069 ↓ 0.0 0 1

Nested Loop (cost=9.32..20.50 rows=1 width=2,950) (actual time=0.069..0.069 rows=0 loops=1)

12. 0.000 0.069 ↓ 0.0 0 1

Nested Loop (cost=9.18..20.30 rows=1 width=2,946) (actual time=0.069..0.069 rows=0 loops=1)

13. 0.000 0.069 ↓ 0.0 0 1

Nested Loop (cost=9.04..20.09 rows=1 width=2,942) (actual time=0.069..0.069 rows=0 loops=1)

14. 0.000 0.069 ↓ 0.0 0 1

Nested Loop (cost=8.90..19.89 rows=1 width=2,938) (actual time=0.069..0.069 rows=0 loops=1)

15. 0.000 0.069 ↓ 0.0 0 1

Nested Loop (cost=8.76..19.69 rows=1 width=2,934) (actual time=0.069..0.069 rows=0 loops=1)

16. 0.001 0.069 ↓ 0.0 0 1

Nested Loop (cost=8.62..19.49 rows=1 width=2,930) (actual time=0.069..0.069 rows=0 loops=1)

17. 0.000 0.068 ↓ 0.0 0 1

Nested Loop (cost=8.48..19.29 rows=1 width=2,926) (actual time=0.068..0.068 rows=0 loops=1)

18. 0.000 0.068 ↓ 0.0 0 1

Nested Loop (cost=8.34..19.09 rows=1 width=2,922) (actual time=0.068..0.068 rows=0 loops=1)

19. 0.000 0.068 ↓ 0.0 0 1

Nested Loop Left Join (cost=8.20..18.89 rows=1 width=2,918) (actual time=0.068..0.068 rows=0 loops=1)

20. 0.000 0.068 ↓ 0.0 0 1

Nested Loop Left Join (cost=7.92..18.23 rows=1 width=2,901) (actual time=0.068..0.068 rows=0 loops=1)

21. 0.000 0.068 ↓ 0.0 0 1

Nested Loop (cost=7.65..17.87 rows=1 width=2,893) (actual time=0.068..0.068 rows=0 loops=1)

22. 0.000 0.068 ↓ 0.0 0 1

Nested Loop (cost=7.37..16.86 rows=1 width=16) (actual time=0.068..0.068 rows=0 loops=1)

  • Join Filter: (users_historicaluser.history_relation_id = t4.user_id)
23. 0.001 0.068 ↓ 0.0 0 1

Nested Loop (cost=7.09..15.52 rows=1 width=12) (actual time=0.068..0.068 rows=0 loops=1)

  • Join Filter: (users_historicaluser.history_relation_id = t6.history_relation_id)
24. 0.009 0.067 ↓ 0.0 0 1

Hash Join (cost=6.96..14.14 rows=2 width=8) (actual time=0.067..0.067 rows=0 loops=1)

  • Hash Cond: (t7.history_relation_id = users_historicaluser.history_relation_id)
25. 0.017 0.017 ↑ 62.0 1 1

Seq Scan on users_historicaluser t7 (cost=0.00..6.93 rows=62 width=4) (actual time=0.017..0.017 rows=1 loops=1)

  • Filter: (upper((email)::text) ~~ '%A%'::text)
  • Rows Removed by Filter: 6
26. 0.000 0.041 ↓ 0.0 0 1

Hash (cost=6.93..6.93 rows=2 width=4) (actual time=0.041..0.041 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
27. 0.041 0.041 ↓ 0.0 0 1

Seq Scan on users_historicaluser (cost=0.00..6.93 rows=2 width=4) (actual time=0.041..0.041 rows=0 loops=1)

  • Filter: (upper((email)::text) ~~ '%RED%'::text)
  • Rows Removed by Filter: 74
28. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t6 (cost=0.14..0.68 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = t7.history_relation_id)
  • Filter: (upper((email)::text) ~~ '%HAT%'::text)
29. 0.000 0.000 ↓ 0.0 0

Index Scan using rooms_reservations_user_id_d5b31217 on rooms_reservations t4 (cost=0.28..1.32 rows=1 width=4) (never executed)

  • Index Cond: (user_id = t7.history_relation_id)
  • Filter: (id IS NOT NULL)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using users_pkey on users (cost=0.28..1.02 rows=1 width=2,877) (never executed)

  • Index Cond: (id = t4.user_id)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using rooms_reservations_user_id_d5b31217 on rooms_reservations (cost=0.28..0.35 rows=1 width=12) (never executed)

  • Index Cond: (users.id = user_id)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using rooms_pkey on rooms (cost=0.28..0.65 rows=1 width=25) (never executed)

  • Index Cond: (rooms_reservations.room_id = id)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t8 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t9 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
35. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t10 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
36. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t11 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t12 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t13 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
39. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t14 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
40. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t15 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t16 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t17 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
43. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t18 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%A%'::text)
44. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t19 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%T%'::text)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t20 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%T%'::text)
46. 0.000 0.000 ↓ 0.0 0

Index Scan using users_historicaluser_history_relation_id_4890ec14 on users_historicaluser t21 (cost=0.14..0.19 rows=1 width=4) (never executed)

  • Index Cond: (history_relation_id = users.id)
  • Filter: (upper((email)::text) ~~ '%T%'::text)
47. 0.000 0.000 ↓ 0.0 0

Index Scan using lead_lead_user_id_91223f04_uniq on lead_lead (cost=0.29..2.18 rows=1 width=282) (never executed)

  • Index Cond: (users.id = user_id)