Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Filegroups Vs Partioning

Author  Topic 

amsqlguy
Yak Posting Veteran

89 Posts

Posted - 2009-07-08 : 10:40:42
Guys,

I have 20 million row table which I split into 4 files in a single file group based on Clustered primary key, basically I recreated the primary key on a
file group. The data is now spread across 4 files, while this improved the performance of queries against this table I am trying to understand how does the
SQL process all the record inserts across the files in file group. In addition how is this file group different from partitioning using a partion function in terms of SQL Engine.

Any suggestions or inputs would help.

Thanks

ahmad.osama
Posting Yak Master

183 Posts

Posted - 2009-07-09 : 03:17:25
quote:
Originally posted by amsqlguy

Guys,

I have 20 million row table which I split into 4 files in a single file group based on Clustered primary key, basically I recreated the primary key on a
file group. The data is now spread across 4 files, while this improved the performance of queries against this table I am trying to understand how does the
SQL process all the record inserts across the files in file group. In addition how is this file group different from partitioning using a partion function in terms of SQL Engine.

Any suggestions or inputs would help.
Thanks



well...these are completely different concept...partitioning splits data based on the partition function across a single filegroup or multiple filegroups; In your case it isn't necessary that the table is divided across 4 files that u have specified.

u can use the below given script to locate table data on files.

Use Adventureworks

-- get the file id's
select * from sys.sysfiles
-- get the pages for a particular table
Declare @dbid smallint,@tableid int
select @dbid=db_id(),@tableid=object_id('Person.Contact')
DBCC ind(@dbid,@tableid,-1) -- google to get the details of command
-- look out for pageType=1 data pages
-- look at the contents of the page
DBCC Traceon(3604)
--DBCC page(dbid,fileid,pagepid,0-3) -- google to get the details of --command
DBCC Page(@dbid,1,9689,3)
--scroll down to see the contents of page....u will find the actual ----data


you can use different fileids to to check which file are being used to store the table data
Go to Top of Page

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-07-09 : 04:05:21
http://sqlblog.com/blogs/sarah_henwood/archive/2007/07/23/validating-what-is-stored-in-a-partition-filegroup.aspx
Go to Top of Page
   

- Advertisement -