准备数据

sysbench --test=oltp --oltp-nontrx-mode=update_key --mysql-table-engine=innodb --oltp-table-size=1000000 --mysql-socket=/tmp/mysql3392.sock --mysql-user=dba --mysql-host=localhost --mysql-password=localdba --db-driver=mysql --mysql-db=test prepare

mysql> desc sbtest;

+-------+------------------+------+-----+---------+----------------+

| Field | Type             | Null | Key | Default | Extra          |

+-------+------------------+------+-----+---------+----------------+

| id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |

| k     | int(10) unsigned | NO   | MUL | 0       |                |

| c     | char(120)        | NO   |     |         |                |

| pad   | char(60)         | NO   |     |         |                |

+-------+------------------+------+-----+---------+----------------+

mysql> select count(c) from sbtest;

+----------+

| count(c) |

+----------+

|  1000000 |

+----------+

char的情况下:::

mysql> desc select * from sbtest order by pad;

+----+-------------+--------+------+---------------+------+---------+------+---------+----------------+

| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows    | Extra          |

+----+-------------+--------+------+---------------+------+---------+------+---------+----------------+

|  1 | SIMPLE      | sbtest | ALL  | NULL          | NULL | NULL    | NULL | 1000126 | Using filesort |

+----+-------------+--------+------+---------------+------+---------+------+---------+----------------+

mysql> set profiling = 1;

Query OK, 0 rows affected (0.00 sec)



mysql> select count(*) from sbtest order by pad;     

+----------+

| count(*) |

+----------+

|  1000000 |

+----------+

1 row in set (0.53 sec)



mysql> show profiles;

+----------+------------+------------------------------------------+

| Query_ID | Duration   | Query                                    |

+----------+------------+------------------------------------------+

|        1 | 0.53102850 | select count(*) from sbtest order by pad |

+----------+------------+------------------------------------------+

1 row in set (0.02 sec)

mysql> show profile cpu,block io for query 1;

+----------------------+----------+----------+------------+--------------+---------------+

| Status               | Duration | CPU_user | CPU_system | Block_ops_in | Block_ops_out |

+----------------------+----------+----------+------------+--------------+---------------+

| starting             | 0.000127 | 0.000000 |   0.000000 |            0 |             0 |

| checking permissions | 0.000017 | 0.000000 |   0.000000 |            0 |             0 |

| Opening tables       | 0.000042 | 0.000000 |   0.000000 |            0 |             0 |

| System lock          | 0.000022 | 0.000000 |   0.000000 |            0 |             0 |

| init                 | 0.000038 | 0.000000 |   0.000000 |            0 |             0 |

| optimizing           | 0.000011 | 0.000000 |   0.000000 |            0 |             0 |

| statistics           | 0.000022 | 0.000000 |   0.000000 |            0 |             0 |

| preparing            | 0.000017 | 0.000000 |   0.000000 |            0 |             0 |

| executing            | 0.000014 | 0.000000 |   0.000000 |            0 |             0 |

| Sending data         | 0.530471 | 0.502923 |   0.018997 |           32 |             0 |

| end                  | 0.000034 | 0.000000 |   0.000000 |            0 |             0 |

| query end            | 0.000010 | 0.000000 |   0.000000 |            0 |             0 |

| closing tables       | 0.000025 | 0.000000 |   0.000000 |            0 |             0 |

| freeing items        | 0.000037 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000004 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000128 | 0.000000 |   0.000000 |            0 |             8 |

| cleaning up          | 0.000012 | 0.000000 |   0.000000 |            0 |             0 |

+----------------------+----------+----------+------------+--------------+---------------+

/////char change to varchar

mysql> alter table sbtest change pad pad varchar(60);

Query OK, 1000000 rows affected (10.72 sec)

Records: 1000000  Duplicates: 0  Warnings: 0

mysql> select pad from sbtest limit 30;

+----------------------------------------------------+

| pad                                                |

+----------------------------------------------------+

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

| qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt |

mysql> desc sbtest;

+-------+------------------+------+-----+---------+----------------+

| Field | Type             | Null | Key | Default | Extra          |

+-------+------------------+------+-----+---------+----------------+

| id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |

| k     | int(10) unsigned | NO   | MUL | 0       |                |

| c     | char(120)        | NO   |     |         |                |

| pad   | varchar(60)      | YES  |     | NULL    |                |

+-------+------------------+------+-----+---------+----------------+

================无索引的情况下:=====================

varchar(60)的情况下: 

mysql> desc  select * from sbtest order by pad;    

+----+-------------+--------+------+---------------+------+---------+------+---------+----------------+

| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows    | Extra          |

+----+-------------+--------+------+---------------+------+---------+------+---------+----------------+

|  1 | SIMPLE      | sbtest | ALL  | NULL          | NULL | NULL    | NULL | 1000117 | Using filesort |

+----+-------------+--------+------+---------------+------+---------+------+---------+----------------+

mysql> select count(*) from sbtest order by pad;     

+----------+

| count(*) |

+----------+

|  1000000 |

+----------+

1 row in set (0.51 sec)

mysql> show profile cpu,block io for query 11;

+----------------------+----------+----------+------------+--------------+---------------+

| Status               | Duration | CPU_user | CPU_system | Block_ops_in | Block_ops_out |

+----------------------+----------+----------+------------+--------------+---------------+

| starting             | 0.000081 | 0.000000 |   0.000000 |            0 |             0 |

| checking permissions | 0.000014 | 0.000000 |   0.000000 |            0 |             0 |

| Opening tables       | 0.000033 | 0.000000 |   0.000000 |            0 |             0 |

| System lock          | 0.000025 | 0.000000 |   0.000000 |            0 |             0 |

| init                 | 0.000028 | 0.000000 |   0.000000 |            0 |             0 |

| optimizing           | 0.000009 | 0.000000 |   0.000000 |            0 |             0 |

| statistics           | 0.000019 | 0.000000 |   0.000000 |            0 |             0 |

| preparing            | 0.000013 | 0.000000 |   0.000000 |            0 |             0 |

| executing            | 0.000011 | 0.000000 |   0.000000 |            0 |             0 |

| Sending data         | 0.506327 | 0.489925 |   0.018997 |            0 |             0 |

| end                  | 0.000026 | 0.001000 |   0.000000 |            0 |             0 |

| query end            | 0.000010 | 0.000000 |   0.000000 |            0 |             0 |

| closing tables       | 0.000022 | 0.000000 |   0.000000 |            0 |             0 |

| freeing items        | 0.000034 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000003 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000114 | 0.000000 |   0.000000 |            0 |             8 |

| cleaning up          | 0.000009 | 0.000000 |   0.000000 |            0 |             0 |

+----------------------+----------+----------+------------+--------------+---------------+

varchar(120)的情况下: 

mysql> alter table sbtest change pad pad varchar(120);  

Query OK, 1000000 rows affected (11.77 sec)

Records: 1000000  Duplicates: 0  Warnings: 0

mysql> desc sbtest;

+-------+------------------+------+-----+---------+----------------+

| Field | Type             | Null | Key | Default | Extra          |

+-------+------------------+------+-----+---------+----------------+

| id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |

| k     | int(10) unsigned | NO   | MUL | 0       |                |

| c     | char(120)        | NO   |     |         |                |

| pad   | varchar(120)     | YES  |     | NULL    |                |

+-------+------------------+------+-----+---------+----------------+

mysql> desc select * from sbtest;

+----+-------------+--------+------+---------------+------+---------+------+---------+-------+

| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows    | Extra |

+----+-------------+--------+------+---------------+------+---------+------+---------+-------+

|  1 | SIMPLE      | sbtest | ALL  | NULL          | NULL | NULL    | NULL | 1000117 |       |

+----+-------------+--------+------+---------------+------+---------+------+---------+-------+

1 row in set (0.00 sec)

mysql> desc select count(*) from sbtest;

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

| id | select_type | table  | type  | possible_keys | key  | key_len | ref  | rows    | Extra       |

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

|  1 | SIMPLE      | sbtest | index | NULL          | k    | 4       | NULL | 1000117 | Using index |

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

1 row in set (0.00 sec)

mysql> select count(*) from sbtest order by pad;

+----------+

| count(*) |

+----------+

|  1000000 |

+----------+

1 row in set (0.51 sec)

mysql> show profile cpu,block io for query 17;

+----------------------+----------+----------+------------+--------------+---------------+

| Status               | Duration | CPU_user | CPU_system | Block_ops_in | Block_ops_out |

+----------------------+----------+----------+------------+--------------+---------------+

| starting             | 0.000073 | 0.000000 |   0.000000 |            0 |             0 |

| checking permissions | 0.000013 | 0.000000 |   0.000000 |            0 |             0 |

| Opening tables       | 0.000031 | 0.000000 |   0.000000 |            0 |             0 |

| System lock          | 0.000024 | 0.000000 |   0.000000 |            0 |             0 |

| init                 | 0.000026 | 0.000000 |   0.000000 |            0 |             0 |

| optimizing           | 0.000008 | 0.000000 |   0.000000 |            0 |             0 |

| statistics           | 0.000019 | 0.000000 |   0.000000 |            0 |             0 |

| preparing            | 0.000013 | 0.000000 |   0.000000 |            0 |             0 |

| executing            | 0.000011 | 0.000000 |   0.000000 |            0 |             0 |

| Sending data         | 0.510981 | 0.491925 |   0.018997 |            0 |             0 |

| end                  | 0.000025 | 0.000000 |   0.000000 |            0 |             0 |

| query end            | 0.000013 | 0.000000 |   0.000000 |            0 |             0 |

| closing tables       | 0.000026 | 0.000000 |   0.000000 |            0 |             0 |

| freeing items        | 0.000039 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000004 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000110 | 0.000000 |   0.000000 |            0 |             8 |

| cleaning up          | 0.000007 | 0.000000 |   0.000000 |            0 |             0 |

+----------------------+----------+----------+------------+--------------+---------------+

================有索引的情况下:=====================

alter table sbtest change pad pad varchar(60);

mysql> alter table sbtest add key(pad);

Query OK, 0 rows affected (7.60 sec)

Records: 0  Duplicates: 0  Warnings: 0

mysql> show index from sbtest;

+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

| Table  | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |

+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

| sbtest |          0 | PRIMARY  |            1 | id          | A         |     1000117 |     NULL | NULL   |      | BTREE      |         |               |

| sbtest |          1 | k        |            1 | k           | A         |           6 |     NULL | NULL   |      | BTREE      |         |               |

| sbtest |          1 | pad      |            1 | pad         | A         |         200 |     NULL | NULL   | YES  | BTREE      |         |               |

+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

varchar(60)

mysql> desc select count(*) from sbtest order by pad;

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

| id | select_type | table  | type  | possible_keys | key  | key_len | ref  | rows    | Extra       |

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

|  1 | SIMPLE      | sbtest | index | NULL          | pad  | 183     | NULL | 1000117 | Using index |

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

mysql> select count(*) from sbtest order by pad;

+----------+

| count(*) |

+----------+

|  1000000 |

+----------+

1 row in set (0.44 sec)

mysql> show profile cpu,block io for query 1

    -> ;

+----------------------+----------+----------+------------+--------------+---------------+

| Status               | Duration | CPU_user | CPU_system | Block_ops_in | Block_ops_out |

+----------------------+----------+----------+------------+--------------+---------------+

| starting             | 0.000115 | 0.000000 |   0.000000 |            0 |             0 |

| checking permissions | 0.000017 | 0.000000 |   0.000000 |            0 |             0 |

| Opening tables       | 0.000043 | 0.000000 |   0.000000 |            0 |             0 |

| System lock          | 0.000023 | 0.000000 |   0.000000 |            0 |             0 |

| init                 | 0.000038 | 0.000000 |   0.000000 |            0 |             0 |

| optimizing           | 0.000010 | 0.000000 |   0.000000 |            0 |             0 |

| statistics           | 0.000024 | 0.000000 |   0.000000 |            0 |             0 |

| preparing            | 0.000018 | 0.000000 |   0.000000 |            0 |             0 |

| executing            | 0.000015 | 0.000000 |   0.000000 |            0 |             0 |

| Sending data         | 0.445040 | 0.428935 |   0.015998 |            0 |             0 |

| end                  | 0.000023 | 0.000000 |   0.000000 |            0 |             0 |

| query end            | 0.000013 | 0.000000 |   0.000000 |            0 |             0 |

| closing tables       | 0.000028 | 0.000000 |   0.000000 |            0 |             0 |

| freeing items        | 0.000041 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000003 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000133 | 0.000000 |   0.001000 |            0 |             8 |

| cleaning up          | 0.000008 | 0.000000 |   0.000000 |            0 |             0 |

+----------------------+----------+----------+------------+--------------+---------------+

varchar(120)的:

mysql> alter table sbtest change pad pad varchar(120);

Query OK, 1000000 rows affected (14.56 sec)

Records: 1000000  Duplicates: 0  Warnings: 0

mysql> show index from sbtest;

+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

| Table  | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |

+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

| sbtest |          0 | PRIMARY  |            1 | id          | A         |     1000117 |     NULL | NULL   |      | BTREE      |         |               |

| sbtest |          1 | k        |            1 | k           | A         |           6 |     NULL | NULL   |      | BTREE      |         |               |

| sbtest |          1 | pad      |            1 | pad         | A         |          24 |     NULL | NULL   | YES  | BTREE      |         |               |

+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

这里開始有差别了.Cardinality 从200降到24

varchar(120) Cardinality =200

varchar(60) Cardinality =40  ... 字段是所有60char长度的

mysql> desc select count(*) from sbtest order by pad;

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

| id | select_type | table  | type  | possible_keys | key  | key_len | ref  | rows    | Extra       |

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

|  1 | SIMPLE      | sbtest | index | NULL          | pad  | 363     | NULL | 1000117 | Using index |

+----+-------------+--------+-------+---------------+------+---------+------+---------+-------------+

mysql> select count(*) from sbtest order by pad;

+----------+

| count(*) |

+----------+

|  1000000 |

+----------+

1 row in set (0.45 sec)

mysql> show profile cpu,block io for query 8;

+----------------------+----------+----------+------------+--------------+---------------+

| Status               | Duration | CPU_user | CPU_system | Block_ops_in | Block_ops_out |

+----------------------+----------+----------+------------+--------------+---------------+

| starting             | 0.000120 | 0.000000 |   0.000000 |            0 |             0 |

| checking permissions | 0.000017 | 0.000000 |   0.000000 |            0 |             0 |

| Opening tables       | 0.000046 | 0.000000 |   0.000000 |            0 |             0 |

| System lock          | 0.000028 | 0.000000 |   0.000000 |            0 |             0 |

| init                 | 0.000038 | 0.000000 |   0.000000 |            0 |             0 |

| optimizing           | 0.000011 | 0.000000 |   0.000000 |            0 |             0 |

| statistics           | 0.000023 | 0.000000 |   0.000000 |            0 |             0 |

| preparing            | 0.000018 | 0.000000 |   0.000000 |            0 |             0 |

| executing            | 0.000013 | 0.000000 |   0.000000 |            0 |             0 |

| Sending data         | 0.452434 | 0.437933 |   0.014998 |            0 |             0 |

| end                  | 0.000025 | 0.000000 |   0.000000 |            0 |             0 |

| query end            | 0.000010 | 0.000000 |   0.000000 |            0 |             0 |

| closing tables       | 0.000023 | 0.000000 |   0.000000 |            0 |             0 |

| freeing items        | 0.000033 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000003 | 0.000000 |   0.000000 |            0 |             0 |

| logging slow query   | 0.000098 | 0.000000 |   0.000000 |            0 |             8 |

| cleaning up          | 0.000007 | 0.000000 |   0.000000 |            0 |             0 |

+----------------------+----------+----------+------------+--------------+---------------+

这里也有差别了.有索引的情况下,

是0.44 pk 0.45s

=====================================================================================================

加到varchar(600)试下

mysql> alter table sbtest change pad pad varchar(600);

Query OK, 1000000 rows affected, 2 warnings (14.60 sec)

Records: 1000000  Duplicates: 0  Warnings: 2

mysql> desc select count(*) from sbtest order by pad;

+----+-------------+--------+------+---------------+------+---------+------+---------+-------+

| id | select_type | table  | type | possible_keys | key  | key_len | ref  | rows    | Extra |

+----+-------------+--------+------+---------------+------+---------+------+---------+-------+

|  1 | SIMPLE      | sbtest | ALL  | NULL          | NULL | NULL    | NULL | 1000117 |       |

+----+-------------+--------+------+---------------+------+---------+------+---------+-------+

1 row in set (0.01 sec)

mysql> select count(*) from sbtest order by pad;     

+----------+

| count(*) |

+----------+

|  1000000 |

+----------+

1 row in set (0.50 sec)

600是0.5s....

版权声明:本文博主原创文章,博客,未经同意不得转载。

varchar 分享影响记忆 试的更多相关文章

  1. 鹅厂揭秘——高端大气的App电量測试

    怎样评价我们开发出来的应用是耗电还是不耗电,怎样測试?这就是我们今天讨论的主题--电量測试,一个在移动应用中新出现的測试类型. 作者简单介绍 watermark/2/text/aHR0cDovL2Js ...

  2. 学习使用Jmeter做压力測试(一)--压力測试基本概念

    一.性能測试的概念         性能測试是通过自己主动化的測试工具模拟多种正常峰值及异常负载条件来对系统的各项性能指标进行測试.负载測试和压力測试都属于性能測试,两者能够结合进行. 通过负载測试, ...

  3. Memory loss【记忆缺失】

    Memory Loss Losing your ability to think and remember is pretty scary. We know the risk of dementia ...

  4. MySQL中的CHAR和VARCHAR到底支持多长?

    最近在研究MySQL的数据类型,我们知道,选择合适的数据类型和数据长度对MySQL的性能影响是不可忽视的,小字段意味着可以MySQL可以读取更多的记录,从而加快查询速度. 网上该问题的答案有很多版本, ...

  5. 学习MySQL我们应该知道哪些东西?

    随笔:小编由于年前一直在找工作,而年后找到工作后又一直在忙工作,所以也很少有时间给大家写点什么,总的来说呢,回顾一下之前面试的几次经历,也曾小小的总结了一下自己的不足,发现自己虽然一直在原有的公司(外 ...

  6. [No0000CA]什么是“普瑞马法则”?以及 如何利用“普瑞马法则”,三步克服惰性

    一般在学习和生活中,我们都可能有这样的经验,就是当说想要作某件事情的时候,但过了好久发现还是没有做:或者觉得有力气使不出来:或者总觉得生活是灰色和抑郁的等等. 这类情况反映在生活中,就是生活好像总是被 ...

  7. ffmpeg编译选项汇总

    编译禁用“jack” 和 “crystalhd” : --disable-crystalhd--disable-indev=jack ================================= ...

  8. 如何部署 H5 游戏到云服务器?

    在自学游戏开发的路上,最有成就感的时刻就是将自己的小游戏做出来分享给朋友试玩,原生的游戏开可以打包分享,小游戏上线流程又长,那 H5 小游戏该怎么分享呢?本文就带大家通过 nginx 将构建好的 H5 ...

  9. 监控SQL:执行表中所有sql语句、记录每个语句运行时间(3)

    原文:监控SQL:执行表中所有sql语句.记录每个语句运行时间(3) 通过执行一个 带参数的存储过程  exec  OpreateTB('OpreateUser','IsRun')  更新表的数据 表 ...

随机推荐

  1. 延迟函数 比sleep效果好

    sleep是会阻塞线程的 网上有些延迟函数测试下来还是会阻塞,而接下来推荐的代码则不会   1 2 3 4 5 6 7 8 9 procedure delay(dwMilliseconds:integ ...

  2. Thymeleaf模板的使用

    使用模板的要点:     页面主体结构固定,具体参数可变,尽可能让参数动态化,才能提高模板的复用性 ================================================== ...

  3. JavaScript快速入门(五)——表达式运算

    赋值运算 赋值运算的形式为左值 = 右值.如果同个表达式中有多个赋值运算,则从右到左运算.例如: a = b = c; // 和下面两行等价 b = c; a = b; 另外一种赋值运算的形式叫做复合 ...

  4. linux配置本地tomcat应用80端口转发

    场景: 本地部署tomcat到8080端口,并期望本地访问80端口来访问本地tomcat. 结论: 使用linux下的iptables工具实现端口转发功能. 具体为 现取得root权限 执行iptab ...

  5. NYOJ 1085 数单词 (AC自己主动机模板题)

    数单词 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描写叙述 为了可以顺利通过英语四六级考试,如今大家每天早上都会早起读英语. LYH本来以为自己在6月份的考试中能够通过六 ...

  6. Tengine中的proxy_upstream_tries

    upsream xxx { server 192.168.100.100; server 192.168.100.101; server 192.168.100.102; } server { loc ...

  7. Swift - 类初始化和反初始化方法(init与deinit)

    1,init():类的初始化方法(构造方法) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ...

  8. JQuery 事件与动画

    第一大部分 提纲 事件与动画 一.事件 1.在JavaScript语法中的事件,把onxxxxx中的on去掉,就是JQuery中的事件. onclick - click ondblclick - db ...

  9. D2010 RTTI + Attribute 简单实现ORM

    还记得David I 今年四月来盛大时,被问及“反射机制能再做得好一点吗?我们想放弃RTTI”,David I 回答“这的确是需要考虑的地方,当然RTTI我们不会放弃的”.(这个白胡子的老哥哥还真很可 ...

  10. POJ 3974 最长回文字串(manacher算法)

    题意:给出一个字符串,求出最长回文字串. 思路:一开始我直接上了后缀数组DC3的解法,然后MLE了.看了DISCUSS发现还有一种计算回文字串更加优越的算法,就是manacher算法.就去学习了一下, ...