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
 Transact-SQL (2005)
 Partition in SQL 2005

Author  Topic 

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2007-05-02 : 02:12:53
Hi All,

Its an continuation of my previous post on this thread
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82895

I did the Partition on the table, since every month around 5 million records are getting inserted into this table.

We continue this through out the year and then archive it to the backup table and then get the report from the archive tables.

So with every month around 5 million records are incremented in this table, so i thought to create the partition with the break up of 5M on the date column, with reage of each month.

But i didnt found any such difference in my query with and without partitions.

Table Schema

CREATE TABLE [dbo].[Hrs_DailyAtt_New](
[ReqNo] [int] NOT NULL,
[EmpID] [int] NOT NULL,
[DlyDate] [smalldatetime] NOT NULL,
[StdHours] [real] NOT NULL,
[OTHours] [real] NOT NULL,
[OTType] [varchar](9) NOT NULL,
[WBSCode] [varchar](9) NOT NULL,
[LocLibLast] [varchar](9) NOT NULL,
[SalProfile] [varchar](9) NOT NULL,
[ReqID] [int] NOT NULL,
[ActiveStatus] [tinyint] NOT NULL
)


There are no Triggers on this table.
ReqNo is the primary key and I had created the Non Cluster index on EmpID.

To Extract the Report for a particular month, it take around 48 Secs.

Any pointers !!

Thanks.



Chirag

http://chirikworld.blogspot.com/

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-02 : 09:58:11
How did you partition table? Each partition is in its own filegroup? What's your query?
Go to Top of Page

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2007-05-02 : 15:10:14
Thanks for the Reply, I will get back you with the answers tomorrow from office..

Chirag

http://chirikworld.blogspot.com/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-05-02 : 15:14:13
As mentioned in the other thread, partitioning isn't going to help with such a small table. 15 million rows is nothing these days.

Post the query that is taking 48 seconds.

Tara Kizer
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -