Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Partitioned tables Expand / Collapse
Author
Message
Posted Tuesday, September 11, 2012 3:13 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 2:40 PM
Points: 298, Visits: 1,089
We've a very large table and I'm thinking to partition it. Either one of these 3 main columns(appid, date or loan_custid) are used in the WHERE clause of the queries.
I've never implemented partitioning before, so my question is should I partition it by the date or appid or loan_custid?
Post #1357719
Posted Wednesday, September 12, 2012 11:56 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 2:40 PM
Points: 298, Visits: 1,089
Hi everyone,
Could someone please help me with this? I can provide more info if needed.

Post #1358147
Posted Tuesday, September 18, 2012 1:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, December 18, 2012 1:37 PM
Points: 1, Visits: 10
Hi,
It all depends on your system. Difficult to say if you should do it by date, id or something else.

The last time I partioned a table I had two parts an historic part and one current, which was partioned by a integer flag that stated if it was a historic part or current.

Best regards,
Shakir
Post #1360597
Posted Wednesday, September 19, 2012 8:08 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 8:36 AM
Points: 4,319, Visits: 6,112
sunny.tjk (9/11/2012)
We've a very large table and I'm thinking to partition it. Either one of these 3 main columns(appid, date or loan_custid) are used in the WHERE clause of the queries.
I've never implemented partitioning before, so my question is should I partition it by the date or appid or loan_custid?


Partitioning is a VERY COMPLEX subsystem and it is VERY easy to get things messed up. Without professional guidance you are very unlikely to be successful in your endeavor. I have come across MANY clients and forum posters that attempted partitioning without proper help and were disappointed or worse. Some questions/recommendations:

1) WHY do you think you need to partition the table? You mention columns that are in a WHERE clause, making me believe you want to use partitioning as a "go fast" button. That is NOT what it was designed for!! It was built primarily to facilitate large table management and especially loading.

2) What is the data loading process for this table?

3) What is the exact and full create-table script for this table (including triggers, keys, indexes)?

4) I STRONGLY recommend you get a professional on board to help you understand your system and whether or not you NEED partitioning and then help you implement, maintain, monitor it correctly. It is quite possible that you simply need to TUNE your existing queries against this table or do other stuff to make things "go fast"!!


Best,

Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru at GMail
Post #1361383
Posted Wednesday, September 19, 2012 3:07 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 4:52 PM
Points: 7,079, Visits: 12,569
Following along with Kevin's post, think it through carefully. Here is a nice write up I recently found to help you consider all points of why you might employ partitioning, the benefits and the drawbacks:

How To Decide if You Should Use Table Partitioning (March 6, 2012) by Kendra Little


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1361639
Posted Wednesday, September 19, 2012 3:10 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 6:24 AM
Points: 42,422, Visits: 35,483
sunny.tjk (9/11/2012)
We've a very large table and I'm thinking to partition it.


Why?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1361643
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse