After running Gather Schema Statistics concurrent request with (LASTRUN) option to save only the history for last run, then run the concurrent request again for 2 times after that found that (FND_STATS_HIST) tables contains the history for all the 3 requests and it is not cleaned up to keep only last run.
Sample steps to reproduce the issue are as following:

1- Login to Oracle Applications.

2- Cleaned all history found in FND_STATS_HIST table be executing (FND_STATS.PURGE_STAT_HISTORY)

3- Check that FND_STATS_HIST table is empty be executing following query which will return ZERO count as a result:
SELECT COUNT(*) FROM FND_STATS_HIST;

4- Run Gather Schema Statistics concurrent request with parameters (for example):
AP:20::NOBACKUP::LASTRUN:GATHER::Y

5- Then run same script used in step 3 and it should return a number this time.

6- Then check if all records returned in step 5 is related to same concurrent request you submitted in step 4 by running following query:
SELECT DISTINCT REQUEST_ID FROM FND_STATS_HIST;

That script will return only one request_id.

7- Then repeat step 4 twice with the same parameters above.

8- Then run same script used in step 3 and it should higher a number or records than the one returned in step 5

9- Check now how many concurrent requests IDs do you have in the table which should be 3 by using same query in step 6

While working with purge old data / archiving application table analysis, we found this issue for one of my customer. When we raised SR to Oracle support, they told its a known BUG:5648754, and we have got a controled patch as resolution for this. So if you have same issue, please raise a SR to oracle support, they could provide you password to download controlled patch for this bug.

PrintFriendly

Viewers of this post also viewed...