MySQL Forums
Forum List  »  Newbie

Re: update queries taking 1 week to finish
Posted by: rol and
Date: August 29, 2014 05:43AM

Thank you for the heads up, i cleaned up my update as you mentioned.

information recap:
- Each "date" field has 7 fields to be filled. as for the "whenadded" it shows when those fields were filled. just to keep track when was the latest update.

here is my create tables :

| oldresult | CREATE TABLE `oldresult` (
  `date` varchar(12) DEFAULT NULL,
  `n1` tinyint(1) DEFAULT NULL,
  `n2` tinyint(1) DEFAULT NULL,
  `n3` tinyint(1) DEFAULT NULL,
  `n4` tinyint(1) DEFAULT NULL,
  `n5` tinyint(1) DEFAULT NULL,
  `n6` tinyint(1) DEFAULT NULL,
  `n7` tinyint(1) DEFAULT NULL,
  `whenadded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  UNIQUE KEY `unique_index` (`date`,`n1`,`n2`,`n3`,`n4`,`n5`,`n6`,`n7`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |



| result | CREATE TABLE `result` (
  `numbers_trig` int(11) NOT NULL,
  `n1` tinyint(1) DEFAULT NULL,
  `n2` tinyint(1) DEFAULT NULL,
  `n3` tinyint(1) DEFAULT NULL,
  `n4` tinyint(1) DEFAULT NULL,
  `n5` tinyint(1) DEFAULT NULL,
  `n6` tinyint(1) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL,
  UNIQUE KEY `unique_index` (`n1`,`n2`,`n3`,`n4`,`n5`,`n6`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |

Options: ReplyQuote


Subject
Written By
Posted
Re: update queries taking 1 week to finish
August 29, 2014 05:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.