AddQuery vs AddEncodedQuery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 03:19 AM
Hi All,
Is there a difference between addquery and addencodedquery. Is there a performance difference between these two considering 2 scenarios : a) When only column value is being matched b)When multiple column values are being matched?
Eventually the query gets converted to "Select *" format right ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 03:32 AM
Hi there,
Interesting question, never really gave it a thought if there would be a possible performance difference between the two, assuming that the end query is the same of course.
I do see some responses on this topic already, though those don't look to go into your actual question.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 03:43 AM
Hi @Mark Roethof,
Yes I am working on one project for improving the performance and I was suggested to try and avoid EncodedQuery function , hence i wanted to understand what is the basic difference which helps to improve the performance or there is nothing like performance improvement to it ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 04:02 AM
Do wonder immediately, who suggested you that? Because that person should than also be able to provide you with a proper "why"?
I usually do the opposite, using encoded queries as much as possible 🙂 Though don't know of any difference in performance in this.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 03:43 AM
I posted your question on SNDevs Slack, maybe someone there knows about this.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 03:45 AM
Thank you 🙂