Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6718289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:57:06+00:00 2026-05-26T08:57:06+00:00

I’m changing an index on a table with more the 2million rows. The execution

  • 0

I’m changing an index on a table with more the 2million rows.
The execution time is now longer then 3000 seconds.
I think anything is working wrong on my pc because other changes before never took so long on the same table. I’ve added all indices with existing data.
Has anybody an experience how much time does it take to change an index with 2 million existsing rows?

How can i check if anything is working fine on my local mysql installation?

Here is the table definition:

CREATE TABLE `sal_forwarding` (
  `sid` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `f_shop` INT(11) NOT NULL,
  `f_offer` INT(11) DEFAULT NULL,
  `link` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  `offerCode` VARCHAR(255) DEFAULT NULL,
  `sub2` VARCHAR(200) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL,
  `forwardTime` DATETIME NOT NULL,
  `cid` CHAR(32) DEFAULT NULL,
  `f_partner` VARCHAR(20) NOT NULL,
  `t` VARCHAR(30) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT '0',
  `toolbarUser` TINYINT(1) NOT NULL DEFAULT '0',
  `blog` TINYINT(1) DEFAULT '0',
  `clickedPosition` INT(10) UNSIGNED DEFAULT NULL,
  `usedFrame` TINYINT(1) NOT NULL DEFAULT '0',
  `sub3` VARCHAR(200) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL,
  `sub4` VARCHAR(200) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL,
  `sub5` VARCHAR(200) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL,
  `sub6` VARCHAR(200) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL,
  `sub7` VARCHAR(200) CHARACTER SET latin1 COLLATE latin1_german1_ci DEFAULT NULL,
  `f_affiliateId` TINYINT(3) UNSIGNED NOT NULL,
  `browser` VARCHAR(50) DEFAULT NULL,
  `bversion` VARCHAR(5) DEFAULT NULL,
  `os` VARCHAR(50) DEFAULT NULL,
  `forwardDate` DATE NOT NULL,
  PRIMARY KEY (`sid`),
  KEY `f_shop` (`f_shop`,`forwardDate`,`cid`),
  KEY `f_partner` (`f_partner`,`forwardDate`),
  KEY `forwardDate` (`forwardDate`,`cid`),
  KEY `forwardDate_2` (`forwardDate`,`f_shop`),
  KEY `forwardDate_3` (`forwardDate`,`f_shop`,`f_partner`),
  KEY `forwardDate_4` (`forwardDate`,`f_partner`,`cid`),
  KEY `forwardDate_5` (`forwardDate`,`f_affiliateId`),
  KEY `forwardDate_6` (`forwardDate`,`f_shop`,`sid`)
) ENGINE=INNODB AUTO_INCREMENT=10747233 DEFAULT CHARSET=latin1;

Thank you very much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:57:06+00:00Added an answer on May 26, 2026 at 8:57 am

    Index creation on large table is relatively slow process, and although I am not an expert, but I believe there is nothing much that u can do in this regard.

    Time does not only depend on the size of table, but it also largely depends upon the column on which index is being created.
    taking 3000 seconds is normal i guess, for table with 2 million rows, I once created composite index on a table with almost 3.5 million rows and it took more than 2 hours…..

    Here are some links where people have shared about their experiences of creating index on large tables in MySQL

    http://lists.mysql.com/mysql/212738

    http://forums.mysql.com/read.php?24,356410,356889#msg-356889

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.