- 论坛徽章:
- 0
|
MYSQL磁盘写入及update索引更新问题?
如题,
我有一个用户表,
ID 为主键.
username建了索引.
mysql> show index from user;
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| user
| 0 | PRIMARY | 1 | id | A | 16639 | NULL | NULL | | BTREE | |
| user
| 1 | username | 1 | username | A | 16639 | NULL | NULL | YES | BTREE | |
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
晕的是,我想知道,我在用户表中更新(update)了某用户的password的该表的索引会不会更新?.
更新(update)了某用户的username的该表的索引会不会更新?.(这个应该会吧.)
还有,我delete 该表了几个用户,结果mysql并没有直接写该表的磁盘文件.user.MYD,user,myi,user,frm.我看了文件的修改日期,没有改变.
是不是有延迟写入磁盘文件啊.
知道的好心人帮忙看看.

[ 本帖最后由 ^-^ 于 2008-8-30 09:08 编辑 ] |
|