Partitioned tables

  • 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?

  • Hi everyone,

    Could someone please help me with this? I can provide more info if needed.

  • 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

  • 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 on googles mail service

  • 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[/url]

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • 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, MVP, M.Sc (Comp Sci)
    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

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply