explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Elln

Settings
# exclusive inclusive rows x rows loops node
1. 0.034 96.631 ↓ 1.8 54 1

Unique (cost=55,282.67..55,283.42 rows=30 width=56) (actual time=96.587..96.631 rows=54 loops=1)

2. 0.097 96.597 ↓ 1.8 54 1

Sort (cost=55,282.67..55,282.74 rows=30 width=56) (actual time=96.586..96.597 rows=54 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: 31kB
3. 0.036 96.500 ↓ 1.8 54 1

Nested Loop (cost=54,926.98..55,281.93 rows=30 width=56) (actual time=95.973..96.500 rows=54 loops=1)

4. 0.006 0.437 ↑ 1.0 1 1

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

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

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

6. 0.008 0.008 ↓ 7.8 31 1

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

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

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

  • Index Cond: ("KeyId" = 4)
8. 0.041 96.027 ↓ 1.8 54 1

Nested Loop Left Join (cost=54,918.37..55,269.00 rows=30 width=56) (actual time=95.535..96.027 rows=54 loops=1)

9. 0.248 95.862 ↑ 2.0 2 1

Hash Join (cost=54,916.58..55,263.55 rows=4 width=36) (actual time=95.471..95.862 rows=2 loops=1)

  • Hash Cond: (usr."Id" = ur."UserId")
10. 1.060 93.837 ↓ 2.0 903 1

Seq Scan on "ApplicationUser" usr (cost=54,836.62..55,181.87 rows=450 width=36) (actual time=92.747..93.837 rows=903 loops=1)

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

SubPlan (forSeq Scan)

12. 2.548 92.777 ↑ 3.2 11 1

Gather (cost=1,000.43..54,836.54 rows=35 width=4) (actual time=40.483..92.777 rows=11 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
13. 90.229 90.229 ↑ 3.8 4 3

Parallel Index Only Scan using tasks_userid_status_index on "Tasks" (cost=0.43..53,833.04 rows=15 width=4) (actual time=42.462..90.229 rows=4 loops=3)

  • Index Cond: ("UserID" IS NOT NULL)
  • Filter: (("UserID" <> 0) AND ("Status" <> 3))
  • Rows Removed by Filter: 643367
  • Heap Fetches: 2438
14. 0.049 1.777 ↓ 9.6 153 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
15. 0.878 1.728 ↓ 9.6 153 1

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

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

Seq Scan on "UserRoles" ur (cost=0.00..51.64 rows=3,264 width=8) (actual time=0.007..0.835 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.060 0.124 ↓ 1.1 27 2

Hash Left Join (cost=1.80..2.46 rows=25 width=28) (actual time=0.032..0.062 rows=27 loops=2)

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

Index Scan using "IX_GroupScope_TaskAssignmentGroupID" on "GroupScope" gs (cost=0.14..0.73 rows=25 width=9) (actual time=0.009..0.019 rows=27 loops=2)

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

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

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

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

Planning time : 1.053 ms