A large number of records (for example, 50,000 records) in chat_queue_entry for a specific queue causes a load time more than 15 seconds after upgrading from legacy chat. The load time increase is caused by the system querying all them.

Steps to Reproduce

In order to see the issue, check how long this queue takes to load:$


This issue occurred after creating many records in chat_queue_entry as follows:

for (var i = 0 ; i< 20000; i ++){
var gr = new GlideRecord('chat_queue_entry');
gr.queue = 'cd846e1747a102009eaff6df1d9a7175'; 
gr.short_description = 'testtest';
gr.state = 3;



Use the following script in a before-query business rule on [chat_queue_entry]. Because the delayed loading time is caused when $ evaluates too many records on [chat_queue_entry], the script limits the query to all active records and all records created within the last thirty days. The latter condition ensures the user can still view their prior conversations for up to a month while preventing $ from evaluating anything older.

     (function executeRule(current, previous /*null when async*/) { 
          var transaction = GlideTransaction.get(); 
          if (!transaction) 
          var page = transaction.getPageName(); 
          if (page.indexOf('api/now/connect/support/collaborators/all') != -1) 

     })(current, previous);


Related Problem: PRB714182

Seen In

Helsinki Patch 3

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:40:06