|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 6:26 PM
Points: 263,
Visits: 866
|
|
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?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 6:26 PM
Points: 263,
Visits: 866
|
|
Hi everyone, Could someone please help me with this? I can provide more info if needed.
|
|
|
|
|
Forum 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
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 6:54 PM
Points: 3,578,
Visits: 5,120
|
|
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
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 5:15 PM
Points: 6,720,
Visits: 11,756
|
|
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
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 4:49 PM
Points: 37,722,
Visits: 29,977
|
|
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
|
|
|
|