Glide Script To Determine Users that are Updating The Same Record Too Many TimesSummary- This KB is to identify which User is updating the same record too many times and flooding the sys_journal_field table utilizing a Glide Script. Below it explains why the Glide script is useful: 1) There are scenarios where slowness is occurring when opening a Case, Problem, Change Record, etc because of large data extractions to the sys_journal_field table2) The sys_journal_field is the table that stores the worknotes information for each record3) The cause of large data extraction on the sys_journal_field table is because a particular record has too many worknotes because the particular record has too many updates to it that inserts a new worknote each time4) You can validate if a particular record has a high number of updates by checking the 'Updates' Column in the list view5) The 'Updates' column will tell you the last user that made the update, but it wont tell you if there were other user's involved in the update6) The text index events generated will tell you each time a user made redundant updates to a particular record since every INSERT, UPDATE, or DELETE on any record generates a text index events (unless it is disabled from text indexing)7) With the text index events you can only capture no more than 6 - 7 days of data since events have a retention period of 6 - 7 days OOTB.InstructionsCaution: Test Script on a subprod environment first Glide Script to Get The Top 100 Most redundantly updated records by Table, Record sys_id And UserName: NOTE: Make sure your running the script on the global in-scope. //Get the count by of redundant record updates by table/record/user function GetUpdatedRecords() { var instanceName = gs.getProperty('instance_name'); var count = new GlideAggregate('sysevent'); //If you want to add date range uncomment the ENCODED QUERY below and comment out the second one below //var strEncodedQuery = "queue=text_index^state=processed^parm2=update^sys_created_onBETWEENjavascript:gs.dateGenerate('2021-09-29','00:00:00')@javascript:gs.dateGenerate('2021-10-06','23:59:59')"; //If you want to get all records uncomment the ENCODED QUERY BELOW and comment out the one above var strEncodedQuery = "queue=text_index^state=processed^parm2=update"; count.addEncodedQuery(strEncodedQuery); count.addAggregate('COUNT'); count.groupBy('table'); count.groupBy('instance'); count.groupBy('sys_created_by'); count.addHaving('COUNT', '>', 1); count.orderByAggregate('COUNT'); //If you want to reduce the record list, uncomment the code below //count.setLimit(10); count.query(); while (count.next()) { var x_count = count.getAggregate('COUNT'); var x_table = count.table.getDisplayValue(); var x_instance = 'https://' + instanceName + '.service-now.com/' + x_table + '.do?sys_id=' + count.instance.getDisplayValue(); var x_created_by = count.sys_created_by.getDisplayValue(); gs.info("Count: {0} | {1} | {2} | {3}" , [x_count, x_table, x_instance, x_created_by]); } } GetUpdatedRecords(); Sample Results: NOTE: The Column format is in: Count Of Updates | Source Table | Updated Record Full Link | User_Name That Made the Update *** Script: Count: 80 | sn_hr_le_case | https://Instance_name.service-now.com/sn_hr_le_case.do?sys_id=224579c0873b301093d5ec6d0ebb358c | hradmin*** Script: Count: 76 | sn_hr_le_case | https://Instance_name.service-now.com/sn_hr_le_case.do?sys_id=1f85f904873b301093d5ec6d0ebb3583 | hradmin*** Script: Count: 74 | sn_hr_le_case | https://Instance_name.service-now.com/sn_hr_le_case.do?sys_id=90c53944873b301093d5ec6d0ebb35d8 | hradmin*** Script: Count: 72 | sn_hr_le_case | https://Instance_name.service-now.com/sn_hr_le_case.do?sys_id=7005f580873b301093d5ec6d0ebb35a3 | hradmin*** Script: Count: 62 | sn_hr_le_case | https://Instance_name.service-now.com/sn_hr_le_case.do?sys_id=b8f53984873b301093d5ec6d0ebb35ec | hradmin