explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JDoY

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 245.828 ↓ 3.0 3 1

Limit (cost=1,761.68..1,761.68 rows=1 width=1,699) (actual time=245.826..245.828 rows=3 loops=1)

2. 0.018 245.825 ↓ 3.0 3 1

Sort (cost=1,761.68..1,761.68 rows=1 width=1,699) (actual time=245.824..245.825 rows=3 loops=1)

  • Sort Key: users."connectedAt
  • Sort Method: quicksort Memory: 29kB
3. 0.009 245.807 ↓ 3.0 3 1

Nested Loop Anti Join (cost=1,716.22..1,761.67 rows=1 width=1,699) (actual time=225.213..245.807 rows=3 loops=1)

4. 0.008 245.768 ↓ 3.0 3 1

Nested Loop Anti Join (cost=1,713.13..1,756.32 rows=1 width=1,699) (actual time=225.196..245.768 rows=3 loops=1)

5. 28.691 245.736 ↓ 3.0 3 1

Bitmap Heap Scan on users (cost=1,712.56..1,751.31 rows=1 width=1,699) (actual time=225.181..245.736 rows=3 loops=1)

  • Recheck Cond: (("selectedLearningLanguageIds" && '{12}'::integer[]) AND ("nativeLanguageIds" && '{1,4}'::integer[]))
  • Filter: (((NOT "androidAppUninstalled") OR "hasDesktopVersion" OR "hasIOSVersion") AND ("learningLanguageLevels" IS NOT NULL) AND ("learningLanguageIds" IS NOT NULL) AND "allowedNatives" AND "isInLiveChat" AND "allowedWomen" AND "isConnected" AND (NOT "isDeleted") AND (("jailScore" < 100) OR ("jailScore" IS NULL)) AND (("courtScore" < 300) OR ("courtScore" IS NULL)) AND (("cagibiScore" < 100) OR ("cagibiScore" IS NULL)) AND (id <> 5097844) AND (NOT ("nativeLanguageIds" && '{3}'::integer[])) AND ((NOT ("blockedLanguageIds" && '{12}'::integer[])) OR ("blockedLanguageIds" IS NULL)) AND ("allowedMinAge" <= 49) AND ("allowedMaxAge" >= 49) AND (birthdate >= '1942-02-06 18:57:28+02'::timestamp with time zone) AND (birthdate <= '1971-02-06 17:57:28+01'::timestamp with time zone))
  • Rows Removed by Filter: 293
  • Heap Blocks: exact=25277
6. 32.229 217.045 ↓ 0.0 0 1

BitmapAnd (cost=1,712.56..1,712.56 rows=34 width=0) (actual time=217.045..217.045 rows=0 loops=1)

7. 97.329 97.329 ↓ 129.2 526,199 1

Bitmap Index Scan on "users_isConnected_idx1" (cost=0.00..515.11 rows=4,073 width=0) (actual time=97.329..97.329 rows=526,199 loops=1)

  • Index Cond: ("isConnected" = true)
8. 87.487 87.487 ↓ 4.0 174,263 1

Bitmap Index Scan on users_languages_idx (cost=0.00..1,197.21 rows=43,051 width=0) (actual time=87.487..87.487 rows=174,263 loops=1)

  • Index Cond: (("selectedLearningLanguageIds" && '{12}'::integer[]) AND ("nativeLanguageIds" && '{1,4}'::integer[]))
9. 0.024 0.024 ↓ 0.0 0 3

Index Only Scan using friends_userid_peerid_key on friends (cost=0.56..2.78 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=3)

  • Index Cond: (("userId" = users.id) AND ("peerId" = 5097844))
  • Heap Fetches: 0
10. 0.003 0.030 ↓ 0.0 0 3

Bitmap Heap Scan on "blockedUsers" (cost=3.09..4.22 rows=1 width=8) (actual time=0.010..0.010 rows=0 loops=3)

  • Recheck Cond: ((("userId" = users.id) AND ("userBlockedId" = 5097844)) OR (("userId" = 5097844) AND ("userBlockedId" = users.id)))
11. 0.003 0.027 ↓ 0.0 0 3

BitmapOr (cost=3.09..3.09 rows=1 width=0) (actual time=0.009..0.009 rows=0 loops=3)

12. 0.015 0.015 ↓ 0.0 0 3

Bitmap Index Scan on "Blocked_users_id_user_id_user_blocked_key" (cost=0.00..1.55 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=3)

  • Index Cond: (("userId" = users.id) AND ("userBlockedId" = 5097844))
13. 0.009 0.009 ↓ 0.0 0 3

Bitmap Index Scan on "Blocked_users_id_user_id_user_blocked_key" (cost=0.00..1.55 rows=1 width=0) (actual time=0.003..0.003 rows=0 loops=3)

  • Index Cond: (("userId" = 5097844) AND ("userBlockedId" = users.id))
Planning time : 2.085 ms
Execution time : 246.005 ms