Service Portal Seach is slow for specific keywordsIssue The service portal search is slow when searching using specific keywords. Search will perform fine for an other set of Keywords. The node logs will display an output with a response time of several seconds: 2020-08-21 03:50:05 (738) Default-thread-10 9B8D5D8DDB7A50103E225A84DC9619DF txid=27e0bd05dbfa *** Start #10220 /api/now/sp/search, user: mouheb.ismail@snc2020-08-21 03:50:05 (745) Default-thread-10 9B8D5D8DDB7A50103E225A84DC9619DF txid=27e0bd05dbfa WARNING *** WARNING *** Get for non-existent record: sp_page:, initializing2020-08-21 03:50:05 (747) http-22 New transaction 9B8D5D8DDB7A50103E225A84DC9619DF #10233 /api/now/analytics/events2020-08-21 03:50:05 (759) Default-thread-10 9B8D5D8DDB7A50103E225A84DC9619DF txid=27e0bd05dbfa WARNING *** WARNING *** JoinQuery invalid field name: document_number2020-08-21 03:50:05 (760) Default-thread-10.0 9B8D5D8DDB7A50103E225A84DC9619DF txid=3e01f909db7e *** Start TSQueryThread - Default-thread-10.0, user: mouheb.ismail@snc2020-08-21 03:50:05 (760) Default-thread-10.2 9B8D5D8DDB7A50103E225A84DC9619DF txid=ba01f909db7e *** Start TSQueryThread - Default-thread-10.2, user: mouheb.ismail@snc2020-08-21 03:50:05 (760) Default-thread-10.1 9B8D5D8DDB7A50103E225A84DC9619DF txid=f201f909db7e *** Start TSQueryThread - Default-thread-10.1, user: mouheb.ismail@snc2020-08-21 03:50:05 (760) Default-thread-10.3 9B8D5D8DDB7A50103E225A84DC9619DF txid=7201f909db7e *** Start TSQueryThread - Default-thread-10.3, user: mouheb.ismail@sncDefault-thread-10.8, user: mouheb.ismail@snc2020-08-21 03:50:05 (831) Default-thread-10.9 9B8D5D8DDB7A50103E225A84DC9619DF txid=fa013d09db7e *** Start TSQueryThread - Default-thread-10.9, user: mouheb.ismail@snc2020-08-21 03:50:19 (599) Default-thread-10 9B8D5D8DDB7A50103E225A84DC9619DF txid=27e0bd05dbfa WARNING *** WARNING *** JoinQuery invalid field name: document_number2020-08-21 03:50:19 (600) Default-thread-10.1 9B8D5D8DDB7A50103E225A84DC9619DF txid=ca11bd09db7e *** Start TSQueryThread - Default-thread-10.1, user: mouheb.ismail@snc2020-08-21 03:50:19 (600) Default-thread-10.2 9B8D5D8DDB7A50103E225A84DC9619DF txid=8211bd09db7e *** Start TSQueryThread - Default-thread-10.2, user: mouheb.ismail@snc2020-08-21 03:50:19 (600) Default-thread-10.0 9B8D5D8DDB7A50103E225A84DC9619DF txid=0611bd09db7e *** Start TSQueryThread - Default-thread-10.0, user: mouheb.ismail@snc2020-08-21 03:50:19 (601) Default-thread-10.3 9B8D5D8DDB7A50103E225A84DC9619DF txid=4a11bd09db7e *** Start TSQueryThread - Default-thread-10.3, user: mouheb.ismail@snc2020-08-21 03:50:19 (601) Default-thread-10.4 9B8D5D8DDB7A50103E225A84DC9619DF txid=0211bd09db7e *** Start TSQueryThread - Default-thread-10.4, user: mouheb.ismail@snc2020-08-21 03:50:19 (603) Default-thread-10.5 9B8D5D8DDB7A50103E225A84DC9619DF txid=c611bd09db7e *** Start TSQueryThread - Default-thread-10.5, user: mouheb.ismail@snc2020-08-21 03:50:19 (603) Default-thread-10.8 9B8D5D8DDB7A50103E225A84DC9619DF txid=0e11bd09db7e *** Start TSQueryThread - Default-thread-10.8, user: mouheb.ismail@snc2020-08-21 03:50:19 (603) Default-thread-10.6 9B8D5D8DDB7A50103E225A84DC9619DF txid=8e11bd09db7e *** Start TSQueryThread - Default-thread-10.6, user: mouheb.ismail@snc2020-08-21 03:50:19 (609) Default-thread-10.8 9B8D5D8DDB7A50103E225A84DC9619DF txid=8211fd09db7e *** Start TSQueryThread - Default-thread-10.8, user: mouheb.ismail@snc2020-08-21 03:50:19 (609) Default-thread-10.9 9B8D5D8DDB7A50103E225A84DC9619DF txid=4a11fd09db7e *** Start TSQueryThread - Default-thread-10.9, user: mouheb.ismail@snc2020-08-21 03:50:19 (619) Default-thread-10 9B8D5D8DDB7A50103E225A84DC9619DF txid=27e0bd05dbfa WARNING *** WARNING *** JoinQuery invalid field name: document_number2020-08-21 03:50:19 (620) Default-thread-10.0 9B8D5D8DDB7A50103E225A84DC9619DF txid=1211fd09db7e *** Start TSQueryThread - Default-thread-10.0, user: mouheb.ismail@snc2020-08-21 03:50:19 (620) Default-thread-10.1 9B8D5D8DDB7A50103E225A84DC9619DF txid=d611fd09db7e *** Start TSQueryThread - Default-thread-10.1, user: mouheb.ismail@sncDefault-thread-10.9, user: mouheb.ismail@snc2020-08-21 03:50:19 (752) Default-thread-10 9B8D5D8DDB7A50103E225A84DC9619DF txid=27e0bd05dbfa EXCESSIVE *** End #10220 /api/now/sp/search, user: mouheb.ismail@snc, total time: 0:00:44.034, processing time: 0:00:14.022, total wait: 0:00:30.012, session wait: 0:00:30.012, SQL time: 0:00:03.456 (count: 632), business rule: 0:00:00.000 (count: 1), ACL time: 0:00:03.348, source: 37.98.232.60 , type:rest, method:POST, api_name:now/sp, resource:now/sp/search, version:Default, user_id:mouheb.ismail@snc, response_status:201 The session debug for detailed SQL will output hundreds of queries against a large table (can be cmdb, entitlements ...) for a single transactionsThese queries are usually preceded with processing of variables (item_option_new)Tracing the call stack for these queries is pointing to the line 43 of the Catalog search source: item['price'] = catalog_item.getCompleteItemPrice(); ReleaseOrlandoCauseThe calculations performed require the system to completely load a catalog item and all it's variables. There should be a variable set/ variable of type selectbox associated with the table seen in the session logs with no preset filters. Though the performance of an open query on this table depends on its size , having multiple items with this same variable executing the same query on a single transaction can definitely cause some slowness.ResolutionThis is an issue that'll only come up if a similar select box is configured against a table that has a large amount of data such as cmdb. If there are any conditions you can apply to the select box we would advise to apply themAlternatively, we can opt to remove the getCompleteItemPrice() calculation from the search source script but note that catalog items would not be displayed with prices when your search results come up.We do have a problem ticket Improvements for PRB1400935 CatalogItemJS.getCompleteItemPrice() . Our Development team identified a few key parts within the getCompleteItemPrice() function that can be improved upon in the event that an item's Ignore Price field is set to true. These changes will be implemented starting from Paris release.Please know that any fixes that come from this (PRB1400935) will not directly impact the original issue for this case. We still recommend implementing one of the suggested workarounds mentioned above.