Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Similarities & Differences Between DB Index, Unique Index, and Text Index in ServiceNow

Santhosh19
Tera Expert

 

🔷 Similarities Between DB Index, Unique Index, and Text Index in ServiceNow

Feature DB Index Unique Index Text Index
Improves Performance✅✅✅
Defined on Fields✅✅✅
Configured via Indexes Module✅✅✅
Used in Query Optimization✅✅✅
Supports Faster Data Retrieval✅✅✅
Can Be Created via Studio or Table Configuration✅✅✅
 

🔶 Differences Between DB Index, Unique Index, and Text Index

Feature DB Index Unique Index Text Index
PurposeSpeeds up queries on fields.Ensures field values are unique.Enables full-text search.
Enforces Uniqueness❌✅❌
Search TypeExact match, range.Exact match only.Keyword, fuzzy, partial match.
Field TypesAny field.Any field.Long text fields.
Common Use CaseFiltering, sorting, joins.Preventing duplicates.Searching descriptions/comments.
Used in Global Search❌❌✅
Supports Multiple Fields✅✅❌ (usually single text field)

 

🛠️ When to Use Each

  • DB Index: Use when you have frequent queries on a field or combination of fields.
  • Unique Index: Use when you need to enforce data integrity (e.g., no duplicate usernames).
  • Text Index: Use when you want to enable keyword search in large text fields (Global search).
0 REPLIES 0