我正在将 410 万条记录导入离线系统,以对我们数据库的一个子集进行一些分析。在运行导入时,我正在尝试使用以下方法检查其进度:
SHOW TABLE STATUS LIKE 'MailIssueElement'
奇怪的是......在不同的时间,我看到Rows
. 我希望它只会上涨。以下是输出示例:
mysql> show table status like 'MailIssueElement' \G
*************************** 1. row ***************************
Name: MailIssueElement
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 2818307
Avg_row_length: 120
Data_length: 338392232
Max_data_length: 281474976710655
Index_length: 158029824
Data_free: 0
Auto_increment: 10248973
Create_time: 2010-02-03 10:58:41
Update_time: 2010-02-03 11:04:06
Check_time: 2010-02-03 10:58:53
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.60 sec)
mysql> show table status like 'MailIssueElement' \G
*************************** 1. row ***************************
Name: MailIssueElement
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 1870294
Avg_row_length: 119
Data_length: 223251912
Max_data_length: 281474976710655
Index_length: 107688960
Data_free: 0
Auto_increment: 10248973
Create_time: 2010-02-03 10:58:41
Update_time: 2010-02-03 11:04:13
Check_time: 2010-02-03 10:58:53
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.35 sec)
mysql> show table status like 'MailIssueElement' \G
*************************** 1. row ***************************
Name: MailIssueElement
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 3074205
Avg_row_length: 120
Data_length: 369507112
Max_data_length: 281474976710655
Index_length: 171537408
Data_free: 0
Auto_increment: 10248973
Create_time: 2010-02-03 10:58:41
Update_time: 2010-02-03 11:04:36
Check_time: 2010-02-03 10:58:53
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.01 sec)
mysql> show table status like 'MailIssueElement' \G
*************************** 1. row ***************************
Name: MailIssueElement
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 1870294
Avg_row_length: 119
Data_length: 223251912
Max_data_length: 281474976710655
Index_length: 107688960
Data_free: 0
Auto_increment: 10248973
Create_time: 2010-02-03 10:58:41
Update_time: 2010-02-03 11:04:40
Check_time: 2010-02-03 10:58:53
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)
这种行为有解释吗?有没有更好的方法来检查我的导入进度?
运行以下版本: 服务器版本:5.0.32-Debian_7etch11-log Debian etch 发行版
编辑:
这是DDL。这是一个 MyISAM 表:
mysql> show create table MailIssueElement \G
*************************** 1. row ***************************
Table: MailIssueElement
Create Table: CREATE TABLE `MailIssueElement` (
`Id` int(11) NOT NULL auto_increment,
`IssueId` int(11) NOT NULL default '0',
`Date` datetime NOT NULL default '0000-00-00 00:00:00',
`Direction` enum('inbound','outbound') NOT NULL default 'inbound',
`ToAddr` varchar(255) NOT NULL default '',
`FromAddr` varchar(255) NOT NULL default '',
`CCAddrs` varchar(255) NOT NULL default '',
`Subject` text NOT NULL,
`ParentIssueElementId` int(11) default NULL,
`ParentIssueElementType` enum('mail','phone') default 'mail',
`AgentId` int(11) NOT NULL default '0',
PRIMARY KEY (`Id`),
KEY `date_idx` (`Date`),
KEY `IssueId` (`IssueId`),
KEY `idx_agent_id` (`AgentId`)
) ENGINE=MyISAM AUTO_INCREMENT=15099881 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
提前致谢,
-aj