Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003

    Unanswered: Diff between unique and indexes?

    I know this had been discussed numerous times and I'm beating a dead horse, but I'm wondering the following.

    Say, after I create a table, I do the following:

    alter table name add unique(num, date, line_no);

    and then

    alter table name add index (num)

    Am I indexing num twice since it's the leftmost part of the unique? Or is unique just force MySQL to make that tuple unique and not index it?

    Thanks for any and all feedback!

  2. #2
    Join Date
    Oct 2003
    Don't know about MySQL, but in oracle and mssql, you would indeed be indexing your column NUM twice.

    Curious about MySQL though...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts