in terms of performance, scalability and maintainability. Sql Server
partitioning allows to spread data on various physical disks leveraging the concurrent
performance of those disks to optimize query performance.
database with multiple file groups. Here is an example with three file groups.
The first is Primary Data file group. Others are Secondary file group. Secondary data files are optional,
are user-defined, and store user data. Secondary files can be used to spread
data across multiple disks by putting each file on a different disk drive.
Create database
the primary data file
the primary data file
Create Partition Function
range function with following syntax.
partition_function_name ( input_parameter_type )
boundary_value [ ,...n ] ] )
func_partition (int)
These boundaries define three partitions. The first contains all values less
than 10. The second contains values between 10 and 49. Third contains rest of
values.
Now create a partition scheme
partition data. Syntax to create scheme is
,...n ] )
func_partition
need to create a table or alter table
Table Creation with partition
Partitioning on Existing Table
KEY CLUSTERED
= OFF, SORT_IN_TEMPDB = OFF,
some data in table
and 3)