What is the max limit character for add query
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2024 04:46 AM
We currently filtering out the sys_emails which are inactive since last few days and closing them using schedule job with the below code
var interactionGr = new GlideRecord('interaction');
interactionGr.addQuery("active" , true);
interactionGr.addQuery("type" , "Email");
interactionGr.addQuery("sys_updated_on" , '<' , inactiveTimeout);
interactionGr.query();
var interactionIds = [];
while(interactionGr.next())
interactionIds.push(interactionGr.getValue("sys_id"));
var emailGr = new GlideAggregate("sys_email");
emailGr.addQuery("target_table", "interaction");
emailGr.addQuery("type","received");
emailGr.addQuery("instance" , 'IN', interactionIds.join(','));
emailGr.addAggregate('MAX', 'sys_updated_on');
emailGr.groupBy("instance");
emailGr.query();
Considering the huge interactions created , wanted to check what is the maximum length of query string to hold the list of sys_id's . And also if we wanted to process this in batch what should be the ideal length of each batch?
Considering the huge interactions created , wanted to check what is the maximum length of query string to hold the list of sys_id's . And also if we wanted to process this in batch what should be the ideal length of each batch?
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2024 04:58 AM
@Jyotshna_M According to my knowledge the maximum length of query string is 4096 characters. Also, there is no way to adjust this limit.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2024 05:08 AM
Any document regarding this would also help