mysql myisam

.frm

.myd

.myi

 

 

insert delayted 

show variables like '%delayed%'

 

lock 

  read,

  write,

  read local

 

pointer

 

优先级

low_priovity

height_priovity

 

 

 

导出数据到文件

 select * from t1 into outfile '/data.data' fields terminated by ',' enclosed by '"';

load data in file 

 load data infile '/data.data' into table t2 fields terminated by ',' enclosed by '"';

 

 

行格式: dynamic,fixed,compressed

决定于行包含的数据类型.

 

hexdump -C /data/t.MYD

 

对于 fix 行格式的表,手工录入的数据需要做如下处理

check table t;

optimize table t;

repair table t;

 

动态行格式,如果行太长的话还存在行迁移.迁移

 

SELECT
    [ALL | DISTINCT | DISTINCTROW ]
      [HIGH_PRIORITY]
      [STRAIGHT_JOIN]
      [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
      [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
    select_expr [, select_expr ...]
    [FROM table_references
      [PARTITION partition_list]
    [WHERE where_condition]
    [GROUP BY {col_name | expr | position}
      [ASC | DESC], ... [WITH ROLLUP]]
    [HAVING where_condition]
    [ORDER BY {col_name | expr | position}
      [ASC | DESC], ...]
    [LIMIT {[offset,] row_count | row_count OFFSET offset}]
    [PROCEDURE procedure_name(argument_list)]
    [INTO OUTFILE 'file_name'
        [CHARACTER SET charset_name]
        export_options
      | INTO DUMPFILE 'file_name'
      | INTO var_name [, var_name]]
    [FOR UPDATE | LOCK IN SHARE MODE]]

 

LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name'
    [REPLACE | IGNORE]
    INTO TABLE tbl_name
    [PARTITION (partition_name,...)]
    [CHARACTER SET charset_name]
    [{FIELDS | COLUMNS}
        [TERMINATED BY 'string']
        [[OPTIONALLY] ENCLOSED BY 'char']
        [ESCAPED BY 'char']
    ]
    [LINES
        [STARTING BY 'string']
        [TERMINATED BY 'string']
    ]
    [IGNORE number {LINES | ROWS}]
    [(col_name_or_user_var,...)]
    [SET col_name = expr,...]

 

posted @ 2014-10-30 23:46  mjorcen  阅读(229)  评论(0编辑  收藏  举报