# Indexing in SQL server and DV 2.0

**URL:** <https://forum.data-community.org/t/indexing-in-sql-server-and-dv-2-0/917>\
**Category:** AutomateDV\
**Created:** [July 25, 2023, 5:19am UTC](https://forum.data-community.org/t/indexing-in-sql-server-and-dv-2-0/917 "2023-07-25T05:19:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DVBeginner](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@DVBeginner](https://forum.data-community.org/u/DVBeginner)\
**Post date:** [July 25, 2023, 5:19am UTC](https://forum.data-community.org/t/indexing-in-sql-server-and-dv-2-0/917/1 "2023-07-25T05:19:57Z")

</div>

Hello

I started testing the automatedv and found that only clustered columnstore indexes are added for all tables. Would you still add additional indexes? E g. Unique non-clustered for hash keys of hubs and links, business keys od hubs, hash key + load date in Sats? Are there available macros to enforce these indexes?

Regards  
Marcin

---

<div class="post-metadata">

**Author:** ![MichaelK](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@MichaelK](https://forum.data-community.org/u/MichaelK)\
**Post date:** [October 5, 2023, 8:18am UTC](https://forum.data-community.org/t/indexing-in-sql-server-and-dv-2-0/917/2 "2023-10-05T08:18:49Z")

</div>

Hi Marcin,  
I guess you can use the indexing macros provided by dbt-sqlserver, please check the dbt docs for mssqlserver configs ( sorry, no links allowed here…)

They will create indices with random names, and you can’t provide a target filegroup.  
Not perfect, but a great starting point for a custom macro.

---

<div class="post-metadata">

**Author:** ![AHenning](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@AHenning](https://forum.data-community.org/u/AHenning)\
**Post date:** [November 4, 2023, 8:55am UTC](https://forum.data-community.org/t/indexing-in-sql-server-and-dv-2-0/917/3 "2023-11-04T08:55:29Z")

</div>

I think you have to create them by yourself. All the indexes you mention are needed in a raw vault.

---

<div class="post-metadata">

**Author:** ![RhysHanscombe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.data-community.org/rhyshanscombe/32/394_2.png) [@RhysHanscombe](https://forum.data-community.org/u/RhysHanscombe)\
**Post date:** [December 1, 2025, 2:33pm UTC](https://forum.data-community.org/t/indexing-in-sql-server-and-dv-2-0/917/4 "2025-12-01T14:33:43Z")

</div>


