SQLTeam.com | Weblogs | Forums

Sparse Tables


#1

I have been asked "does your database have any Sparse Tables". Our database has a lot of tables and I'm not sure how to find the answer. Can someone point me in the right direction?

Thanks,
Terry Brothers


#2

We have sparse columns
https://docs.microsoft.com/en-us/sql/relational-databases/tables/use-sparse-columns?view=sql-server-2017

If you select from sys.columns, is_sparse indicates if column is "sparsed"


#3

That worked ... Thank you!!

One more question if you don't mind. Where do I find if there is any "Partition Switching" and "Data Masking"?

I guess that might be two questions.

Thanks,
Terry


#4

Actually the only thing I cannot figure out is how to tell if there is any Partition Switching. I have everything else answered. Any help will be appreciated!

Regards,
Terry


#5

To my knowledge, partition switching is done through scripts/functions, so I would start looking at daily/weekly/monthly/yearly jobs in the agent. Also, in sys.partitions you can see if your tables uses partitions at all.