query_cache_notembedded.result
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:2k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. set GLOBAL query_cache_size=1355776;
  2. flush query cache;
  3. flush query cache;
  4. reset query cache;
  5. flush status;
  6. drop table if exists t1, t2, t3, t11, t21;
  7. create table t1 (a int not null);
  8. insert into t1 values (1),(2),(3);
  9. create table t2 (a int not null);
  10. insert into t2 values (1),(2),(3);
  11. select * from t1;
  12. a
  13. 1
  14. 2
  15. 3
  16. select * from t2;
  17. a
  18. 1
  19. 2
  20. 3
  21. insert into t1 values (4);
  22. show status like "Qcache_free_blocks";
  23. Variable_name Value
  24. Qcache_free_blocks 2
  25. flush query cache;
  26. show status like "Qcache_free_blocks";
  27. Variable_name Value
  28. Qcache_free_blocks 1
  29. drop table t1, t2;
  30. create table t1 (a text not null);
  31. create table t11 (a text not null);
  32. create table t2 (a text not null);
  33. create table t21 (a text not null);
  34. create table t3 (a text not null);
  35. insert into t1 values("1111111111111111111111111111111111111111111111111111");
  36. insert into t2 select * from t1;
  37. insert into t1 select * from t2;
  38. insert into t2 select * from t1;
  39. insert into t1 select * from t2;
  40. insert into t2 select * from t1;
  41. insert into t1 select * from t2;
  42. insert into t2 select * from t1;
  43. insert into t1 select * from t2;
  44. insert into t2 select * from t1;
  45. insert into t1 select * from t2;
  46. insert into t2 select * from t1;
  47. insert into t1 select * from t2;
  48. insert into t2 select * from t1;
  49. insert into t1 select * from t2;
  50. insert into t2 select * from t1;
  51. insert into t11 select * from t1;
  52. insert into t21 select * from t1;
  53. insert into t1 select * from t2;
  54. insert into t2 select * from t1;
  55. insert into t1 select * from t2;
  56. insert into t3 select * from t1;
  57. insert into t3 select * from t2;
  58. insert into t3 select * from t1;
  59. select * from t11;
  60. select * from t21;
  61. show status like "Qcache_total_blocks";
  62. Variable_name Value
  63. Qcache_total_blocks 7
  64. show status like "Qcache_free_blocks";
  65. Variable_name Value
  66. Qcache_free_blocks 1
  67. insert into t11 values("");
  68. select * from t3;
  69. show status like "Qcache_total_blocks";
  70. Variable_name Value
  71. Qcache_total_blocks 8
  72. show status like "Qcache_free_blocks";
  73. Variable_name Value
  74. Qcache_free_blocks 1
  75. flush query cache;
  76. show status like "Qcache_total_blocks";
  77. Variable_name Value
  78. Qcache_total_blocks 7
  79. show status like "Qcache_free_blocks";
  80. Variable_name Value
  81. Qcache_free_blocks 1
  82. drop table t1, t2, t3, t11, t21;
  83. CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY AUTO_INCREMENT ) ENGINE =
  84. MyISAM;
  85. LOCK TABLE t1 READ LOCAL;
  86. INSERT INTO t1 VALUES (), (), ();
  87. SELECT * FROM t1;
  88. a
  89. SELECT * FROM t1;
  90. a
  91. 1
  92. 2
  93. 3
  94. SELECT * FROM t1;
  95. a
  96. drop table t1;
  97. set GLOBAL query_cache_size=0;