Click here to Skip to main content
Click here to Skip to main content
Go to top

How to Partition Table in SQL Server

, 31 Jul 2014
Rate this:
Please Sign up or sign in to vote.
How to Partition Table in SQL

I got inspired to write this article becuase of such nice feature of SQL Server improved 80% speed to application response.

Problem: I was trying to retrive 1,000+ of customers from 4,00,000 which nearly taking 2 minutes with Indexed created and Optimisez SQL statement. After implementation of partitioning it was just 15 seconds response time.

Partition feature depends on your database scheme and use. I was retriving customers based on DealerCode so I have created the Parition by Dealers. In the example below I am taking Date as example.

Procedure: 

1: Right click on the table and in the context menu select Storage >> Create Partition.

2: Select table column to parition (E.g. DealerID, Year, CountryID)

3: Give the name of the partition function 

 4:Provide the name of the partition scheme and press next.

5:

Left boundary

The Boundary column label in the grid will dynamically display <= Boundary when you select Left boundary.

Right boundary Select to include range values up to the specified value in the Boundary column for each filegroup selected. The specified value will be the starting value for the range values of the filegroup on the next row. The Boundary column label in the grid will dynamically display < Boundary when you select Right boundary.

Select the starting and ending date and select the Date Range from Monthly, Yearly, Quarterly, Half-Yearly , Daily and press OK.

 

Thats It.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Kale Yogesh
Technical Lead
India India
Having 4+ years of professional software development experience in analysis, design, development, testing and implementation of enterprise web applications for automobile, Digital Marketing, Telecommunication domain with good exposure to object-oriented design, software architectures, design patterns, test-driven development and agile practices.
 
Area of Working : Dedicated to Microsoft .NET Technologies
Proficient in: C# , ASP.net, SQL
 
Software Development
 
Database: Microsoft SQL Server,
Development Frameworks: Microsoft .NET 1.1, 2.0, 3.5, 4.0
UI: Windows Forms, ASP.NET Web Forms and ASP.NET MVC3, JQuery
Coding: WinForm , Web Development, XHTML, XML, HTML5, Javascript, WCF
 
Achievements:
First prize in National Level Project competition in Academic
Winner in Dotnet contest by Microsoft
Winner in Dotnet contest by Techgig
Winner in SQL Server Solution contest by Microsoft

Comments and Discussions

 
GeneralMy vote of 1 PinmemberMember 109815274-Aug-14 3:09 
GeneralMy vote of 2 Pinprofessionalbobfox1-Aug-14 8:09 
GeneralRe: My vote of 2 PinmemberMember 108828261-Aug-14 11:51 
GeneralRe: My vote of 2 [modified] PinmemberKale Yogesh6-Aug-14 2:07 
QuestionClarification Pinprofessionalcoded0071-Aug-14 3:16 
QuestionQuerying PinmemberEric Castellon31-Jul-14 3:02 
AnswerRe: Querying PinmemberKale Yogesh6-Aug-14 2:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 31 Jul 2014
Article Copyright 2014 by Kale Yogesh
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid