dbt-msft / tsql-utils

dbt-utils for the dbt-msft family of packages
MIT License
25 stars 25 forks source link

Manually specify varchar length to max length #15

Closed alittlesliceoftom closed 3 years ago

alittlesliceoftom commented 3 years ago

allowed whilst still enabling indexes. Maybe a tiny bit less performant than default (30) but much more flexible.

This is a competing PR to #14 .

Hopefully it enables the same functionality gain with less code.

alittlesliceoftom commented 3 years ago

Surrogate key passes tests from this change.

What do you think @swanderz

dataders commented 3 years ago

@jkock what do you think?

jkock commented 3 years ago

From a SQL database optimization point of view, this seems to be overdoing it. But on the other hand is it also a bad optimization to need to rewrite all macro's for SQL server because of this little issue.

So, I guess this would be OK

alittlesliceoftom commented 3 years ago

@jkock if you notice performance issues then we could consider reducing length or reverting to the many rewrites at a later date, but agger with @swanderz merging this until those performance issues are raised as an actual issue by a user in practice. :)