# Database Aggregation Taking time

**URL:** <https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344>\
**Category:** IIQ Discussion and Questions\
**Tags:** identityiq\
**Created:** [September 20, 2024, 8:00pm UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344 "2024-09-20T20:00:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankeetarjyal](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@ankeetarjyal](https://developer.sailpoint.com/discuss/u/ankeetarjyal)\
**Post date:** [September 20, 2024, 8:00pm UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344/1 "2024-09-20T20:00:07Z")

</div>

#### We are seeing an issue on a database application aggregation. We have enabled partition for the application and have around 102000 accounts in the application. Once the aggregation kicks off, the other applications aggregation and other tasks hang on pending state for a long time. The application in question has taken days to aggregate and is making sailpoint slower and also throws error when searching for any identity during the aggregation is in progress. Has anyone seen similar issues on DB aggregations?

---

<div class="post-metadata">

**Author:** ![vishal\_kejriwal1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/vishal_kejriwal1/32/10904_2.png) [@vishal\_kejriwal1](https://developer.sailpoint.com/discuss/u/vishal_kejriwal1)\
**Post date:** [September 20, 2024, 9:45pm UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344/2 "2024-09-20T21:45:18Z")

</div>

Are you using “Data needs to be merged” ?

---

<div class="post-metadata">

**Author:** ![abhishek\_chowdhury](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/abhishek_chowdhury/32/6767_2.png) [@abhishek\_chowdhury](https://developer.sailpoint.com/discuss/u/abhishek_chowdhury)\
**Post date:** [September 20, 2024, 11:40pm UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344/3 "2024-09-20T23:40:16Z")

</div>

Can you share results of database performance test of your enviornment.

---

<div class="post-metadata">

**Author:** ![enistriminsait](https://avatars.discourse-cdn.com/v4/letter/e/58f4c7/32.png) [@enistriminsait](https://developer.sailpoint.com/discuss/u/enistriminsait)\
**Post date:** [September 21, 2024, 2:33am UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344/4 "2024-09-21T02:33:39Z")

</div>

Hi @ankeetarjyal ,

the problem could depedes from various causes. When SP aggregates data from a DB, thare 4 sptes:

1. Send the query to target DB
2. target DB elaborates the query and send the result to SP
3. The task server elaborates the data appling the rule
4. SP DB save the data

So, first of all you need understand how much time target DB need for elaborate and send the result. it’s almost impossible, but not entirely, that a DB need days for a query.  
Later you need to check how much rule are launched for the aggregation, how much record and columns are elaborates and the performance of SP DB.

It could be, you have a problem some locks on DB, or a low resource for task and DB server, or a firewall between task and DB server(SP doesnt want).

In every case, these are the improvements you can make:

- Analyze and optimize the query
- Delete the colums from query that are not necessary, if its possible
- Analyze and optimize the rules of connector, if you have
- like @vishal_kejriwal1, active `Data needs to be merged` if an account have more record
- Improve the number of partitions and threads for aggrergaton and task
- Analyze the performace of SP DB, like @abhishek_chowdhury says

For the first point, if the target DB need a lot of time for execute the query you can ask to DBA to create a Stored procedure further optimize the query.  
For the last 2 point, you can increase the number of task server and increase the resource for SP DB.

---

<div class="post-metadata">

**Author:** ![paul\_hilchey](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/paul_hilchey/32/24080_2.png) [@paul\_hilchey](https://developer.sailpoint.com/discuss/u/paul_hilchey)\
**Post date:** [September 21, 2024, 2:53am UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344/5 "2024-09-21T02:53:47Z")

</div>

When you check the task result, have the partitions been created? Are they progressing or are they stuck?

---

<div class="post-metadata">

**Author:** ![vinnysail](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/vinnysail/32/17001_2.png) [@vinnysail](https://developer.sailpoint.com/discuss/u/vinnysail)\
**Post date:** [September 21, 2024, 5:54am UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344/6 "2024-09-21T05:54:15Z")

</div>

Hi @ankeetarjyal  
You can start looking into the partitioning best practices article - [https://community.sailpoint.com/t5/Other-Documents/Partitioning-Best-Practices/ta-p/74964](https://community.sailpoint.com/t5/Other-Documents/Partitioning-Best-Practices/ta-p/74964)  
you can navigate to debug page and traverse to “Request definition” → “Aggregate Partition” see if you can increase the maxThreads count based on the CPU’s and task servers that you have. Please refer the best practices article to see more information.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [November 20, 2024, 5:54am UTC](https://developer.sailpoint.com/discuss/t/database-aggregation-taking-time/82344/7 "2024-11-20T05:54:38Z")

</div>

Closed on November 20, 2024, 5:54am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
