I am using Azure SQL database to store data. As the dataset is really huge and it keeps growing day by day, I am looking out a way to partition the existing table based on a integer field. Below is how my table looks like
branch_code | dept | total_sale |
---|---|---|
215 | Grocery | 1500 |
1230 | Cosmetics | 20000 |
300 | Cosmetics | 10000 |
312 | Jewellery | 15000 |
There are multiple branches of a Super market and each branch holds multiple department numbers whose data will be stored and retrieved from the database on a regular basis.
To overcome performance issue with huge record count, I am trying to partition the above existing table based on Branch code.
I tried with the below query
ALTER TABLE dbo.department_data PARTITION BY (branch_code) PARTITIONS 4;
but I am getting error saying
Incorrect syntax near 'PARTITION'.
Can some one help me with a solution to partition the existing Azure SQL table based on an integer field