maintain keys table 7002

BeliasBelias Member Posts: 2,998
edited 2011-03-30 in SQL General
hi everyone, i was wondering what'w the reason in maintaining both these keys in table 7002
Item No.,Sales Type,Sales Code,Starting Date,Currency Code,Variant Code,Unit of Measure Code,Minimum Quantity (PK)
Sales Type,Sales Code,Item No.,Starting Date,Currency Code,Variant Code,Unit of Measure Code,Minimum Quantity
Isn't it safe to UNmaintain the second key?what's the reason for sql to use the second one?
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog

Comments

  • krikikriki Member, Moderator Posts: 9,112
    A little late...but
    Customer Card=>menubutton functions=>Prices. Shows the Sales prices and uses the second key.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • BeliasBelias Member Posts: 2,998
    it's never late for researching (as you may have understood, my post was actually a pure consideration on that table, it was not a "problem" to solve).
    ok, now that i know where it's used, i can do some test; i mean: how much is the benefit of maintaining this key against the drawback of maintaining an additional key for the table? :-k
    thanks for the info!
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • DenSterDenSter Member Posts: 8,307
    That table has only 2 keys, SQL Server won't have any problem maintaining those. Try to find other tables to spend that much energy on :mrgreen:
  • BeliasBelias Member Posts: 2,998
    DenSter wrote:
    That table has only 2 keys, SQL Server won't have any problem maintaining those. Try to find other tables to spend that much energy on :mrgreen:
    You're right, but it's a kind of "game" for me to troubleshoot sql performance (i'm not talking about a production DB, obviously)...i love the subject very much, and i'm always trying to dig into it deeper and deeper. :mrgreen:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • DenSterDenSter Member Posts: 8,307
    Ah but figuring out a production database is what performance troubleshooting is all about. You can't look at a Cronus database and decide based on a where used analysis which keys can be disabled, the Cronus database tells you absolutely NOTHING about where the performance problems are. What you are doing there is definitely NOT performance troubleshooting. Looking at tables with just two keys is not where you should be focusing. What will matter most is where the bulk of the transactions are, where the highest number of users are going to work in the same area at the same time.

    Analyzing actual production usage is what will make you good at this 'game'.
Sign In or Register to comment.