SQL Server Partitioning - Notion -


i have got database consisting of several thousand of tables (from 2005) 20-30% of them have incremental rowcount of 200k/yr.

the requirement visualize statistics of table based on column lastaccesseddate. scheme classify parition groups (10 y, 5y, 3y, 1y, 6m, 3m, 1m, 2w, currentdate). partitions named p1,p2,..p10

i able understand multiple partitionining groups can defined tables link.

the job runs every week , therefore, partitioning scheme varies on current date; i.e. after week, p10 becomes p9. after 2 weeks, p9 becomes p8 , after month, p8 becomes p7; hope idea.

  1. is partitioning scheme based on current date feasible?
  2. if feasible, worthwhile horizontally partition tables , query them instead of running query through entire table? sql server reports suggests total space usage around 31,556 mb.

i running on sql server 2008 instance.

you mention data storage , statistics requirements. these 2 should not confused. storage solutions made quick access of data, , statistics in domain of reporting , visualisation.

with respect storage should use partitioning, not in proposed way. can have 10.000 partitions in sql server, use one day or one week usefull partition key. once created can switch sections in , out of partitioned table, should not move data existing partition partition, implies recalculation constraints , indexes. in views can create additional values later 'group by' actions. these groups can describe required '1d, 1w, 1m, 1q, 1y' reporting values.

so yes it's feasible , recommended use partitions case, in different way proposed.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -