shamshad.ali (9/3/2015)
I have an assignment on this and prepare a presentation for this task in few days. Please do not forget your post on this. I need to resolve it ASAP.Shamshad Ali.
Heh... it is YOUR assignment, not mine, and you still need to study to pull this whole thing off so you don't burn yourself or the company data. 😉 Do you even know what a Partition Function is?
Is all that you're interested in is the ability to move a day out of the table each day? If so, my code will do you no good. You need to post the DDL for the table you want to partition including all the indexes, identify how may rows per day the table will take on, how many rows the table currently has in it, what the current size of the table is in bytes including the indexes, how much free space you have, whether or not any of the columns are targets of FKs (those will likely go away if present), and the column you want to partition on. I can't even modify the original code you posted because I don't even know the name of the column you want to partition on.
I'll also warn you that partitioning can actually degrade performance for many of your queries.
Of course, if you actually read what I suggested you read, you'd already know that. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.