You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.7 KiB

  1. drop table if exists t1, t2;
  2. set GLOBAL query_cache_type=on;
  3. set GLOBAL query_cache_size=1355776;
  4. reset query cache;
  5. flush status;
  6. set GLOBAL query_cache_type=on;
  7. set GLOBAL query_cache_size=1355776;
  8. reset query cache;
  9. flush status;
  10. create table t1 (a int) engine=ndbcluster;
  11. create table t2 (a int) engine=ndbcluster;
  12. insert into t1 value (2);
  13. insert into t2 value (3);
  14. select * from t1;
  15. a
  16. 2
  17. select * from t2;
  18. a
  19. 3
  20. show status like "Qcache_queries_in_cache";
  21. Variable_name Value
  22. Qcache_queries_in_cache 2
  23. show status like "Qcache_inserts";
  24. Variable_name Value
  25. Qcache_inserts 2
  26. show status like "Qcache_hits";
  27. Variable_name Value
  28. Qcache_hits 0
  29. show status like "Qcache_queries_in_cache";
  30. Variable_name Value
  31. Qcache_queries_in_cache 0
  32. show status like "Qcache_inserts";
  33. Variable_name Value
  34. Qcache_inserts 0
  35. show status like "Qcache_hits";
  36. Variable_name Value
  37. Qcache_hits 0
  38. select * from t1;
  39. a
  40. 2
  41. show status like "Qcache_queries_in_cache";
  42. Variable_name Value
  43. Qcache_queries_in_cache 1
  44. show status like "Qcache_inserts";
  45. Variable_name Value
  46. Qcache_inserts 1
  47. show status like "Qcache_hits";
  48. Variable_name Value
  49. Qcache_hits 0
  50. update t1 set a=3 where a=2;
  51. show status like "Qcache_queries_in_cache";
  52. Variable_name Value
  53. Qcache_queries_in_cache 2
  54. show status like "Qcache_inserts";
  55. Variable_name Value
  56. Qcache_inserts 2
  57. show status like "Qcache_hits";
  58. Variable_name Value
  59. Qcache_hits 0
  60. select * from t1;
  61. a
  62. 3
  63. show status like "Qcache_queries_in_cache";
  64. Variable_name Value
  65. Qcache_queries_in_cache 2
  66. show status like "Qcache_inserts";
  67. Variable_name Value
  68. Qcache_inserts 3
  69. show status like "Qcache_hits";
  70. Variable_name Value
  71. Qcache_hits 0
  72. drop table t1, t2;
  73. set GLOBAL query_cache_size=0;
  74. set GLOBAL query_cache_size=0;