Multiple column Indexes for a table

venkatesh tadip
Tera Contributor

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.

venkateshtadip_0-1707053613783.png

Can anyone please confirm if the above will work without any impact (performance etc.) to the functionality? compared to the individual indexes?

 

2 REPLIES 2

NVSN
Tera Contributor

Hi @venkatesh tadip,

Below answer will be helpful for you.

https://www.servicenow.com/community/now-platform-forum/how-to-check-on-the-status-of-a-table-indexi... 

 

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.

BalaG
Kilo Sage

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

 

Screenshot 2024-02-04 at 4.54.43 PM.png

 

If this answer solved your issue please mark it as a solution or mark it 👍 helpful if it was of help.

--

Bala Guthy