Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4991

Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4993

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php:4991) in /www/htdocs/v030397/mysql-qotd/wp-includes/feed-rss2-comments.php on line 8
Comments on: Question 74: What’s the quickest way of dropping indexes? http://mysql-qotd.casperia.net/archives/494 mysql 5.0/5.1 questions for learning purposes Fri, 06 Aug 2010 16:56:36 +0000 http://wordpress.org/?v=abc hourly 1 By: plogi http://mysql-qotd.casperia.net/archives/494/comment-page-1#comment-84 plogi Mon, 21 Jun 2010 18:32:24 +0000 http://mysql-qotd.casperia.net/?p=494#comment-84 <b> b One would imagine, that dropping an index would take no time at all - like dropping a table. But most ALTERs actually cause the table to be recreated in a temporary table and then renamed. 1 ALTER is faster than 2 ALTERs, because you get away with recreating the table only once. Really important, if your table contains a billion rows. By the way, there was already a question about this ;) </b>
b

One would imagine, that dropping an index would take no time at all – like dropping a table.
But most ALTERs actually cause the table to be recreated in a temporary table and then renamed.
1 ALTER is faster than 2 ALTERs, because you get away with recreating the table only once.
Really important, if your table contains a billion rows.

By the way, there was already a question about this ;)

]]>