will Collocation help in following situation.

  • Hi,

    I was trying to partition my tables , and also read about Collocation.

    q1) I would like to know whether i will get benefit of Collocation in following situation or not.

    q2) Should i make clusterd index on partition key Pid

    q3) will it get benefit from partitioning.

    I have a table "A" and "B" with many columns and it has one Partition key Pid with is not unique.

    with in a table Pid repeates 3 or 4 times.

    Both are partitioned, since the partition key is not unique.

    so at many places i have to use following query.

    1) Select * from A

    join (select Distinct pid , tname from B) B1

    on A.pid = B.pid

    where ......

    2) Select * from A

    where exist (select pid , tname from B

    on A.pid = B.pid

    )

    yours sincerly

  • What do you mean by 'collocation'? The definition I'm familiar with is 'the action of placing things side by side or in position', which doesn't make sense here.

    As for the partitioning, what's the goal of the partitioning? What are you trying to achieve by partitioning the table?

    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
  • I am trying to get speed by making one table out of many table joins from queries.

    and collocation is stroger form of alignment of partitioning (mssql 2005)

    note:(I tried to change the heading to elaborate, but i could not do.)

    yous sincerly.

  • If you're trying to get queries running faster, don't waste your time looking at partitioning, it's not a general performance tuning technique. Performance improvements are possible from partitioning, but it usually requires that the queries are written specifically to take advantage of the partitioning.

    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
  • thank you,

    but my question is still not answered.

    yours sincerly.

  • the answer is no, then.

    speeding up of the queries will require indexing changes /additions based on the common WHERE statements being used;

    partitioning for performance, like Gail mentioned, is WAY on the bottom of the list for things to tackle when improving performance.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • rajemessage 14195 (12/10/2013)


    but my question is still not answered.

    I answered your question

    If you're trying to get queries running faster, don't waste your time looking at partitioning

    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
  • Please confirm

    query no 1) and 2) will not get the benefit of alignment/collocation,

    if i use them in exists or derived table?

    yours sincerly

Viewing 8 posts - 1 through 7 (of 7 total)

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