Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 15930

Existing Table Partition

$
0
0

Hi,

We have a existing table and it has two date columns (Datatype - Datetime) and it's very big table and we would like to make a partition table.
This is a frequently accessed table.
We need partition for different date ranges.
I am thinking following:

 1)Create one or two new file group as we have only one PRIMARY FILE GROUP
2) create the partition function for my DateTime Column
3) create the partition scheme to link the partition function to the new filegroup

Now i have to DateTime Column - OpenDate and closeDate, I need to use following logic:

If Opendate > Today's date then i need to move into Partition1
If Opendate = Today's date then i need to move into Partition2
and for another column
If Closedate < (Today's date - 24 hrs) then i need to move into another Partition3

Could you please suggest, how i can handle it?


Viewing all articles
Browse latest Browse all 15930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>