List:Internals« Previous MessageNext Message »
From:Venu Kalyan Date:March 4 2010 7:35pm
Subject:Re: unique_checks and InnoDB primary key
View as plain text  
> Why should unique checks ever be turned off?  Wouldn't that violate the
> UNIQUE constraint?  Or at least delay it until too late to do a proper
> ROLLBACK?

Well for many cases, its faster...when one is dumping and loading
existing data; why should one go through the whole check when someone
knows that there is no dups. Even internally alter table foo
engine=MyISAM/InnoDB; should do the same by skipping validation part
(wen re-creating the existing table)

mysqldump also uses this mechanism...
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;

Thanks
Venu
Thread
unique_checks and InnoDB primary keyZardosht Kasheff2 Mar
  • Re: unique_checks and InnoDB primary keySunny Bains2 Mar
    • Re: unique_checks and InnoDB primary keyZardosht Kasheff2 Mar
      • Re: unique_checks and InnoDB primary keySunny Bains3 Mar
        • Re: unique_checks and InnoDB primary keyZardosht Kasheff3 Mar
          • Re: unique_checks and InnoDB primary keySunny Bains3 Mar
            • Re: unique_checks and InnoDB primary keyZardosht Kasheff3 Mar
        • Re: unique_checks and InnoDB primary keyRick James4 Mar
          • Re: unique_checks and InnoDB primary keyVenu Kalyan4 Mar
            • Re: unique_checks and InnoDB primary keyRick James26 Jul