Indexing TenantID in Multi Tenant DB
问题 I am creating a multi tenant db for an application. I have gone with the TenantID in every table approach and it works very well. I am at the performance tuning stage. My question is should each TenantID in every table be indexed for optimized searching as every query on the db will filter on this column? Look forward to any advice. Thanks 回答1: Although there are many considerations you need to make when indexing, In my experience, the (unique) clustered index works well as tenantId + PK All