Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL very slow for alter table query
    primarykey
    data
    text
    <p>Why is it taking more than an hour to simply update this table to add a column? This table has 15M rows. It has 2 indexes and a single key primary key. The ALTER TABLE query has been in "copy to tmp table" state for 1 hour 15 minutes now.</p> <pre><code>ALTER TABLE `frugg`.`item_catalog_map` ADD COLUMN `conversion_url` TEXT NULL DEFAULT NULL </code></pre> <p>Table:</p> <pre><code>mysql&gt; describe item_catalog_map; +------------------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------------+---------------+------+-----+---------+-------+ | catalog_unique_item_id | varchar(255) | NO | PRI | NULL | | | catalog_id | int(11) | YES | MUL | NULL | | | item_id | int(11) | YES | MUL | NULL | | | price | decimal(10,2) | YES | | 0.00 | | +------------------------+---------------+------+-----+---------+-------+ mysql&gt; show index from item_catalog_map; +------------------+------------+----------------------+--------------+------------------------+-----------+-------------+----------+--------+------+------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | +------------------+------------+----------------------+--------------+------------------------+-----------+-------------+----------+--------+------+------------+---------+ | item_catalog_map | 0 | PRIMARY | 1 | catalog_unique_item_id | A | 15485115 | NULL | NULL | | BTREE | | | item_catalog_map | 1 | IDX_ACD6184FCC3C66FC | 1 | catalog_id | A | 18 | NULL | NULL | YES | BTREE | | | item_catalog_map | 1 | IDX_ACD6184F126F525E | 1 | item_id | A | 15485115 | NULL | NULL | YES | BTREE | | +------------------+------------+----------------------+--------------+------------------------+-----------+-------------+----------+--------+------+------------+---------+ </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload