diff --git a/README.md b/README.md index cef5e51..0fe3e4c 100644 --- a/README.md +++ b/README.md @@ -168,6 +168,9 @@ The Choice table should not be used as the reference table for a Reference type ## Category: Performance +### Identifies string fields with max_length exceeding recommended limits +This scan checks for string fields where the max_length value is set above a recommended limit. Setting a very high max_length can result in unnecessary database storage consumption and may degrade query performance. It is important to use reasonable max_length values based on actual data requirements. + ### getMessage() called in Client Script This is a simple table check to find client scripts with use the getMessage function but do not preload messages using the Messages field. As the check does a simple contains query it could produce false-positives if the getMessage is either commented or from another library. diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md b/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md new file mode 100644 index 0000000..455baff --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md @@ -0,0 +1,18 @@ +# Generated files +This repository contains generated files and a checksum. + +If you find yourself unable to import your repository due to the presence of files edited outside an instance of ServiceNow, merge commits that mix files from different revisions, or other data that does not match the checksum, you may recover using either of the following techniques: +* Remove the problem commits: + 1. Clone your repository to a personal computer with the git command line tools installed and open a git command prompt in the repository root + 2. Run `git log` and take note of the SHA1s of the problem commits + 3. Build revert commits using `git revert SHA1` repeatedly, working backward in time, for each commit that introduced changes not generated by a ServiceNow instance + 4. Run `git push` + +* Overwrite the problem code snapshot with a known good one: + 1. Clone your repository to a personal computer with the git command line tools installed and open a git command prompt in the repository root, + 2. Locate a known good code snapshot and record its SHA1. For this step, `git log` can be useful. + 2. Run `git reset --hard SHA1` to a commit that was generated by a ServiceNow instance + 3. Run `git reset HEAD{1}` + 4. Run `git add -A` + 5. Run `git commit` + 6. Run `git push` diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt index 5aac10a..b764fd1 100644 --- a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt @@ -1 +1 @@ -WWQm_IdWsTxg4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p3LWF8_BqfxFeYFCEQV3l3xC8ic2ZQn_98i9fpgURFU9Ec2BEGbbMfpm7KehrFl0bNOVDTDEWIETdt80lvfR1i0-8Yk1vHWvLdB94dHoPw1a77oWht1HxEMkNzE1m38ANVQVZq2-pbVdIiAYCLeRBdd5i_LrNLpF7iCHBpAawuxX5BQIVKBW3WNTPhWUdV9_a1_394CDBmYswn8XiQSx0Vi0hfjuuMp9J9sQxOVVq2MFyWZiDvhIX2CJutq8xn27shQc7Y5xeZN5SVosFrv3irWYkzJuKoU \ No newline at end of file diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_8b90df49839112107b681390ceaad3be.xml b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_8b90df49839112107b681390ceaad3be.xml new file mode 100644 index 0000000..c8c5669 --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_8b90df49839112107b681390ceaad3be.xml @@ -0,0 +1,47 @@ + + + true + false + performance + internal_type=string^ORinternal_type=string_full_utf8^max_length>4000^nameNOT LIKEsys_hub^EQ + + + + + + This scan checks for string fields where the max_length value is set above a recommended limit. Setting a very high max_length can result in unnecessary database storage consumption and may degrade query performance. It is important to use reasonable max_length values based on actual data requirements. + https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0685779 + scan_finding + String Fields with Excessive Max Length + 3 + Review the identified string fields and adjust the max_length to a value that matches the actual data requirements. + +Use lower values for fields that only need to store short text. For fields that may contain longer content, consider using appropriate max_length values, such as 255 for typical text fields. + +Avoid setting max_length values unnecessarily high to reduce the impact on storage and performance. + + 100 + 0 + 1 + + Identifies string fields with max_length exceeding recommended limits + scan_table_check + admin + 2024-10-15 21:43:15 + 8b90df49839112107b681390ceaad3be + 6 + String Fields with Excessive Max Length + ca8467c41b9abc10ce0f62c3b24bcbaa + + ca8467c41b9abc10ce0f62c3b24bcbaa + scan_table_check_8b90df49839112107b681390ceaad3be + admin + 2024-10-15 22:11:06 + sys_dictionary
+ false +
+ +