explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R3fO

Settings
# exclusive inclusive rows x rows loops node
1. 0.018 101.213 ↑ 1.1 27 1

Unique (cost=53,885.17..53,885.92 rows=30 width=56) (actual time=101.191..101.213 rows=27 loops=1)

2. 0.050 101.195 ↑ 1.1 27 1

Sort (cost=53,885.17..53,885.24 rows=30 width=56) (actual time=101.189..101.195 rows=27 loops=1)

  • Sort Key: usr."Id", usr."Name", usr."UserName", s."ID", s."Category", s."ScopePriority", s."Value", s."ValueID", gs."ExcludeScope
  • Sort Method: quicksort Memory: 28kB
3. 0.014 101.145 ↑ 1.1 27 1

Nested Loop (cost=53,531.13..53,884.43 rows=30 width=56) (actual time=101.047..101.145 rows=27 loops=1)

4. 0.007 0.022 ↑ 1.0 1 1

Bitmap Heap Scan on "Settings" st (cost=8.61..12.63 rows=1 width=0) (actual time=0.021..0.022 rows=1 loops=1)

  • Recheck Cond: (("Value" = '1'::text) AND ("KeyId" = 4))
  • Heap Blocks: exact=1
5. 0.001 0.015 ↓ 0.0 0 1

BitmapAnd (cost=8.61..8.61 rows=1 width=0) (actual time=0.015..0.015 rows=0 loops=1)

6. 0.009 0.009 ↓ 7.8 31 1

Bitmap Index Scan on "IX_Settings_Value" (cost=0.00..4.18 rows=4 width=0) (actual time=0.009..0.009 rows=31 loops=1)

  • Index Cond: ("Value" = '1'::text)
7. 0.005 0.005 ↓ 12.8 51 1

Bitmap Index Scan on "IX_Settings_KeyId" (cost=0.00..4.18 rows=4 width=0) (actual time=0.004..0.005 rows=51 loops=1)

  • Index Cond: ("KeyId" = 4)
8. 0.015 101.109 ↑ 1.1 27 1

Nested Loop Left Join (cost=53,522.52..53,871.50 rows=30 width=56) (actual time=101.024..101.109 rows=27 loops=1)

9. 0.357 101.020 ↑ 4.0 1 1

Hash Join (cost=53,520.73..53,866.01 rows=4 width=36) (actual time=100.973..101.020 rows=1 loops=1)

  • Hash Cond: (usr."Id" = ur."UserId")
10. 1.594 99.028 ↓ 2.1 883 1

Seq Scan on "ApplicationUser" usr (cost=53,440.77..53,784.42 rows=425 width=36) (actual time=97.414..99.028 rows=883 loops=1)

  • Filter: ((NOT (hashed SubPlan 1)) AND ("Status" = 6) AND ("IsBlocked" = 0))
  • Rows Removed by Filter: 714
11.          

SubPlan (forSeq Scan)

12. 2.330 97.434 ↑ 1.9 18 1

Gather (cost=1,000.43..53,440.69 rows=35 width=4) (actual time=57.760..97.434 rows=18 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
13. 95.104 95.104 ↑ 2.5 6 3

Parallel Index Only Scan using tasks_userid_status_index on "Tasks" (cost=0.43..52,437.19 rows=15 width=4) (actual time=26.628..95.104 rows=6 loops=3)

  • Index Cond: ("UserID" IS NOT NULL)
  • Filter: (("UserID" <> 0) AND ("Status" <> 3))
  • Rows Removed by Filter: 643285
  • Heap Fetches: 1301
14. 0.045 1.635 ↓ 9.6 153 1

Hash (cost=79.75..79.75 rows=16 width=4) (actual time=1.635..1.635 rows=153 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
15. 0.824 1.590 ↓ 9.6 153 1

Hash Join (cost=19.49..79.75 rows=16 width=4) (actual time=0.028..1.590 rows=153 loops=1)

  • Hash Cond: (ur."RoleId" = r."Id")
16. 0.751 0.751 ↓ 1.0 3,313 1

Seq Scan on "UserRoles" ur (cost=0.00..51.64 rows=3,264 width=8) (actual time=0.008..0.751 rows=3,313 loops=1)

17. 0.003 0.015 ↑ 3.0 1 1

Hash (cost=19.45..19.45 rows=3 width=4) (actual time=0.015..0.015 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.012 0.012 ↑ 3.0 1 1

Seq Scan on "Roles" r (cost=0.00..19.45 rows=3 width=4) (actual time=0.008..0.012 rows=1 loops=1)

  • Filter: (lower("Name") = 'agent'::text)
  • Rows Removed by Filter: 6
19. 0.029 0.074 ↓ 1.1 27 1

Hash Left Join (cost=1.80..2.47 rows=25 width=28) (actual time=0.047..0.074 rows=27 loops=1)

  • Hash Cond: (gs."ScopeID" = s."ID")
20. 0.021 0.021 ↓ 1.1 27 1

Index Scan using "IX_GroupScope_TaskAssignmentGroupID" on "GroupScope" gs (cost=0.14..0.74 rows=25 width=9) (actual time=0.011..0.021 rows=27 loops=1)

  • Index Cond: ("TaskAssignmentGroupID" = usr."TaskAssignmentGroupID")
21. 0.011 0.024 ↑ 1.0 29 1

Hash (cost=1.29..1.29 rows=29 width=23) (actual time=0.024..0.024 rows=29 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
22. 0.013 0.013 ↑ 1.0 29 1

Seq Scan on "Scope" s (cost=0.00..1.29 rows=29 width=23) (actual time=0.006..0.013 rows=29 loops=1)

Planning time : 2.542 ms
Execution time : 101.380 ms