title: Is an unique composite key optimized for retreival performance?
body: <p>I have the following table.  Is the unique index on email/sites_id adequate so that a query such as <code>SELECT * FROM users WHERE fk=123 AND email="john@example.com";</code> is optimized for retrieval?</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `users` (
    `id` INT UNSIGNED NOT NULL,
    `name` VARCHAR(45) NOT NULL,
    `email` VARCHAR(45) NULL,
    `fk` INT UNSIGNED NULL,
    `sites_id` INT UNSIGNED NOT NULL,
    PRIMARY KEY (`id`),
    UNIQUE INDEX `unique_email` (`email` ASC, `sites_id` ASC),
    INDEX `fk_index` (`fk` ASC),
    INDEX `fk_sites_index` (`sites_id` ASC),
    CONSTRAINT `fk_constraint`
      FOREIGN KEY (`fk`)
      REFERENCES `other_table` (`id`)
      ON DELETE NO ACTION
      ON UPDATE NO ACTION,
    CONSTRAINT `sites_constraint`
      FOREIGN KEY (`sites_id`)
      REFERENCES `sites` (`id`)
      ON DELETE NO ACTION
      ON UPDATE NO ACTION)
  ENGINE = InnoDB
  PACK_KEYS = 0
  ROW_FORMAT = DEFAULT;
  </code></pre>