[EMAIL PROTECTED] :

When use query with 'like' condition,it would cost too much time.

Mysql is using innodb structure ,but not myisam.
We haven't test how diff between innodb & myisam.
But now the performance is too low.

We plan to separate the table group by date or specified flag.

It seems need the table storing the splited table name.

When query,the program needs loop the splited table.

We know the Oracle support view. So the program needs not loop the table by 
application layer.
But mysql doesn't provide view, any suggestion?

BTW,we have tune the my.cnf,such query buffer,sorting buffer,innodb buffer,etc. 

Table structure:
| WAVE_RECORD | CREATE TABLE `WAVE_RECORD` (
  `wr_no` bigint(20) NOT NULL auto_increment,
  `ip_addr` varchar(15) NOT NULL default '',
  `file_name` varchar(100) default NULL,
  `rec_date` datetime NOT NULL default '0000-00-00 00:00:00',
  `in_phone` varchar(20) NOT NULL default '',
  `out_phone` varchar(20) NOT NULL default '',
  `staff_name` varchar(20) NOT NULL default '',
  `folder_name` varchar(8) NOT NULL default '',
  `status` char(1) NOT NULL default '',
  `log_date` datetime NOT NULL default '0000-00-00 00:00:00',
  `server_name` varchar(20) NOT NULL default '',
  `file_size` bigint(20) NOT NULL default '0',
  PRIMARY KEY  (`wr_no`),
  UNIQUE KEY `file_name` (`file_name`),
  KEY `idx_ip_addr` (`ip_addr`),
  KEY `idx_rec_date` (`rec_date`),
  KEY `idx_in_phone` (`in_phone`),
  KEY `idx_out_phone` (`out_phone`),
  KEY `idx_staff_name` (`staff_name`),
  KEY `idx_status` (`status`)
) TYPE=InnoDB |


Here's some example about the performance.
mysql> select count(*) from WAVE_RECORD;
+----------+
| count(*) |
+----------+
| 18733998 |
+----------+
1 row in set (2 min 49.60 sec)

mysql> select count(*) from WAVE_RECORD where server_name='gz_inc01';
+----------+
| count(*) |
+----------+
|   550421 |
+----------+
1 row in set (14 min 47.11 sec)

Best regards.
 
                MaFai
                [EMAIL PROTECTED]
                2005-01-26
                34955929



 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to