After upgrading to Jakarta, the CMDB table structure changes to Table Per Partition. Because of this schema change, most queries against CMDB will change slightly. Index Hints and Query Rewrites will be impacted by this change as their query hash value, which is used to map index hints to the impacted query, will now be different. With the new hash value, the query will no longer be mapped to the index hint (or rewrite). If this index hint (or rewrite) was put in place and is currently being used to improve performance for a query, that query may end up being slow again and need to have a new index hint (or rewrite) but in place.
Steps to Reproduce
Create an index hint on a query against CMDB for a query that spans several columns that span multiple CMDB child tables.
Upgrade the instance to Jakarta so it goes through the TPP migration table.
Navigate to System Diagnostics > Stats > Slow Queries.
Note: that the the query has a new record in the Slow Queries table as well as a new hash value. For this reason, the query will no longer be using the previous index hint/query rewrite to optimize performance.
This is an expected side effect of the new TPP migration in Jakarta and there are no possible code changes to fix this. It is a one-time occurrence on upgrade. If you do not have any Index Hints or Query Rewrites on CMDB queries you will not be impacted.
This will only impact active index hints and query rewrites for CMDB-specific queries after upgrade to Jakarta. Index Hints and Query Rewrites can be implemented only by ServiceNow Customer Support. Unless Customer Support has added an index hint or query rewrite to your instance you will not be impacted.
Unfortunately, the workaround is not as straightforward as re-adding the index hint or query rewrite. The query will most likely have a new structure after the upgrade, therefore, you will need to find the slow query again in the Slow Queries log and work with Customer Support to add the index hint (or query rewrite) from this record. Adding the index hint or query rewrite can only be done by customer support.
Related Problem: PRB1235769