explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aplg

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 156.604 ↓ 0.0 0 1

Unique (cost=53,680.14..53,680.89 rows=30 width=56) (actual time=156.604..156.604 rows=0 loops=1)

2. 0.022 156.603 ↓ 0.0 0 1

Sort (cost=53,680.14..53,680.21 rows=30 width=56) (actual time=156.603..156.603 rows=0 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: 25kB
3. 0.003 156.581 ↓ 0.0 0 1

Nested Loop (cost=53,326.11..53,679.40 rows=30 width=56) (actual time=156.581..156.581 rows=0 loops=1)

4. 0.008 0.028 ↑ 1.0 1 1

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

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

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

6. 0.012 0.012 ↓ 7.8 31 1

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

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

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

  • Index Cond: ("KeyId" = 4)
8. 0.001 156.550 ↓ 0.0 0 1

Nested Loop Left Join (cost=53,317.50..53,666.48 rows=30 width=56) (actual time=156.550..156.550 rows=0 loops=1)

9. 0.335 156.549 ↓ 0.0 0 1

Hash Join (cost=53,315.70..53,660.98 rows=4 width=36) (actual time=156.549..156.549 rows=0 loops=1)

  • Hash Cond: (usr."Id" = ur."UserId")
10. 1.566 153.145 ↓ 2.1 873 1

Seq Scan on "ApplicationUser" usr (cost=53,235.75..53,579.40 rows=425 width=36) (actual time=151.553..153.145 rows=873 loops=1)

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

SubPlan (for Seq Scan)

12. 8.570 151.579 ↑ 2.9 12 1

Gather (cost=1,000.43..53,235.66 rows=35 width=4) (actual time=140.236..151.579 rows=12 loops=1)

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

Parallel Index Only Scan using tasks_userid_status_index on "Tasks" (cost=0.43..52,232.16 rows=15 width=4) (actual time=67.684..143.009 rows=4 loops=3)

  • Index Cond: ("UserID" IS NOT NULL)
  • Filter: (("UserID" <> 0) AND ("Status" <> 3))
  • Rows Removed by Filter: 643154
  • Heap Fetches: 830
14. 0.088 3.069 ↓ 9.6 153 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
15. 1.546 2.981 ↓ 9.6 153 1

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

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

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

17. 0.003 0.019 ↑ 3.0 1 1

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

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

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

  • Filter: (lower("Name") = 'agent'::text)
  • Rows Removed by Filter: 6
19. 0.000 0.000 ↓ 0.0 0

Hash Left Join (cost=1.80..2.47 rows=25 width=28) (never executed)

  • Hash Cond: (gs."ScopeID" = s."ID")
20. 0.000 0.000 ↓ 0.0 0

Index Scan using "IX_GroupScope_TaskAssignmentGroupID" on "GroupScope" gs (cost=0.14..0.74 rows=25 width=9) (never executed)

  • Index Cond: ("TaskAssignmentGroupID" = usr."TaskAssignmentGroupID")
21. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.29..1.29 rows=29 width=23) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Seq Scan on "Scope" s (cost=0.00..1.29 rows=29 width=23) (never executed)

Planning time : 1.688 ms
Execution time : 156.803 ms