English 中文(简体)
是否增加或删除所有指数的表力娱乐栏?
原标题:Does adding or deleting columns to a table force recreation of all indexes?

具体地说,在MySQL(尽管我假定对Oracle和Microsoft服务器Q)也是如此。 如果在表格中增加或删除一栏,则所有现行指数(表格)是否都需要从零页上设定?

我想,如果我们改变表流大小(增加/删除一栏),那么,ROWIDS就会改变(非分组表格),从而迫使所有指数的娱乐。

如果使用一个分组指数(Index Organized Table in Blake),那么我想整个分组指数也必须重新计算。

如果需要重新调整所有指数,是否有优化重建时间的战略?

最佳回答

你们说的是MySQL的版本以及储存的发动机。 但我怀疑对你的回答是在这个页上:

http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

对你的问题的简短回答是,如果你增加或删除一栏,整个表格将重新设计(所有数据和所有索引)。 为了提高速度,尝试如下:

MyISAM: Increase the value of myisam_sort_buffer_size

InnoDB: Increase innodb_buffer_pool_size
Increase innodb_log_file_size

Either storage engine: Use the smallest column data types possible for your columns.

Source: I m a Certified MySQL DBA.

问题回答

暂无回答




相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签