Multiple column Indexes for a table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 05:36 AM
Hi Guys,
I have a query regarding the table Indexing.
As per a requirement, I am planning to create a Index for two different columns in a table .
Table-1
Column-A
Column -B
Can we create a single Index for both A and B:
Index(I): A and B.
Can anyone please confirm if the above will work without any impact (performance etc.) to the functionality? compared to the individual indexes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 11:05 AM
Hi @venkatesh tadip,
Below answer will be helpful for you.
If my response is useful, then kindly mark it as "Accept as Solution" and/or " Helpful."
This helps community and as well as me.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2024 04:56 PM
Hi @venkatesh tadip Yes you can create an database index with multiple columns, also called a compound index. The difference between one and two column indexes would is minor. As you highlighted, ServiceNow uses them in a lot of places, including tables extending task. Here is a screenshot of first 10 indexes on task table
If this answer solved your issue please mark it ✅ as a solution or mark it 👍 helpful if it was of help.
--
Bala Guthy