Click here to Skip to main content
13,409,878 members (37,679 online)
Click here to Skip to main content
Add your own
alternative version


3 bookmarked
Posted 31 Jul 2014

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.


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.


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.


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


About the Author

Kale Yogesh
Technical Lead
India India
Having 5+ 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# ,, 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

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

You may also be interested in...


Comments and Discussions

GeneralMy vote of 1 Pin
Ravi Makhija P17-Dec-14 0:28
memberRavi Makhija P17-Dec-14 0:28 
GeneralMy vote of 1 Pin
Member 109815274-Aug-14 4:09
memberMember 109815274-Aug-14 4:09 
GeneralMy vote of 2 Pin
bobfox1-Aug-14 9:09
professionalbobfox1-Aug-14 9:09 
GeneralRe: My vote of 2 Pin
Member 108828261-Aug-14 12:51
memberMember 108828261-Aug-14 12:51 
GeneralRe: My vote of 2 Pin
Kale Yogesh6-Aug-14 3:07
memberKale Yogesh6-Aug-14 3:07 
QuestionClarification Pin
coded0071-Aug-14 4:16
professionalcoded0071-Aug-14 4:16 
AnswerRe: Clarification Pin
Kale Yogesh17-Feb-15 2:09
memberKale Yogesh17-Feb-15 2:09 
QuestionQuerying Pin
Eric Castellon31-Jul-14 4:02
memberEric Castellon31-Jul-14 4:02 
AnswerRe: Querying Pin
Kale Yogesh6-Aug-14 3:19
memberKale Yogesh6-Aug-14 3:19 
Dave Kreskowiak26-Mar-11 7:16
mvpDave Kreskowiak26-Mar-11 7:16 
Trollslayer26-Mar-11 8:38
mentorTrollslayer26-Mar-11 8:38 
Mika Wendelius26-Mar-11 8:58
memberMika Wendelius26-Mar-11 8:58 
Hans Dietrich26-Mar-11 11:01
mentorHans Dietrich26-Mar-11 11:01 
Dave Kreskowiak26-Mar-11 13:11
mvpDave Kreskowiak26-Mar-11 13:11 
GeneralLittle more explanations Pin
Mika Wendelius26-Mar-11 5:13
memberMika Wendelius26-Mar-11 5:13 
GeneralMore like a Tip/Trick Pin
Henry Minute26-Mar-11 4:39
mvpHenry Minute26-Mar-11 4:39 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180221.1 | Last Updated 31 Jul 2014
Article Copyright 2014 by Kale Yogesh
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid