Guest User

some benchmark

a guest
Jul 26th, 2012
122
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. mysql> describe smalltable;
  3. +------------------+--------------------------------------------+------+-----+---------------------+----------------+
  4. | Field            | Type                                       | Null | Key | Default             | Extra          |
  5. +------------------+--------------------------------------------+------+-----+---------------------+----------------+
  6. | id               | int(11) unsigned                           | NO   | PRI | NULL                | auto_increment |
  7. |                  | int(11) unsigned                           | NO   | MUL | 0                   |                |
  8. |                  | int(11) unsigned                           | NO   | MUL | 0                   |                |
  9. | varchar255       | varchar(255)                               | NO   | UNI |                     |                |
  10. |                  | bigint(20) unsigned                        | NO   |     | NULL                |                |
  11. |                  | datetime                                   | NO   | MUL | 0000-00-00 00:00:00 |                |
  12. |                  | datetime                                   | NO   |     | 0000-00-00 00:00:00 |                |
  13. |                  | enum('FREE','DONE','FAILED','IN_PROGRESS') | NO   | MUL | NULL                |                |
  14. |                  | int(11)                                    | NO   |     | NULL                |                |
  15. |                  | int(2)                                     | NO   | MUL | -1                  |                |
  16. |                  | tinyint(3) unsigned                        | NO   |     | 0                   |                |
  17. +------------------+--------------------------------------------+------+-----+---------------------+----------------+
  18. 11 rows in set (0.00 sec)
  19.  
  20. mysql> set profiling =1;
  21. Query OK, 0 rows affected (0.00 sec)
  22.  
  23. mysql> select count(*) from smalltable;
  24. +-----------+
  25. | count(*)  |
  26. +-----------+
  27. | 249711281 |
  28. +-----------+
  29. 1 row in set (2 min 30.98 sec)
  30.  
  31. mysql> select varchar255 from smalltable where id = 178245354;
  32. +----------------------------------------------------------------------+
  33. | varchar255                                                           |
  34. +----------------------------------------------------------------------+
  35. | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
  36. +----------------------------------------------------------------------+
  37. 1 row in set (0.01 sec)
  38.  
  39. mysql> select id from smalltable where varchar255='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
  40. +-----------+
  41. | id        |
  42. +-----------+
  43. | 178245354 |
  44. +-----------+
  45. 1 row in set (0.00 sec)
  46.  
  47. mysql> select varchar255 from smalltable where id = 178245354;
  48. +----------------------------------------------------------------------+
  49. | varchar255                                                           |
  50. +----------------------------------------------------------------------+
  51. | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
  52. +----------------------------------------------------------------------+
  53. 1 row in set (0.00 sec)
  54.  
  55. mysql> select varchar255 from smalltable where id = 78245354;
  56. +---------------------------------------------------------------------------------------------------------------+
  57. | varchar255                                                                                                    |
  58. +---------------------------------------------------------------------------------------------------------------+
  59. | wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww |
  60. +---------------------------------------------------------------------------------------------------------------+
  61. 1 row in set (0.12 sec)
  62.  
  63. mysql> select varchar255 from smalltable where id = 128245354;
  64. +---------------------------------------------------------------------------+
  65. | varchar255                                                                |
  66. +---------------------------------------------------------------------------+
  67. | qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq |
  68. +---------------------------------------------------------------------------+
  69. 1 row in set (0.02 sec)
  70.  
  71. mysql> select id from smalltable where varchar255='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
  72. +-----------+
  73. | id        |
  74. +-----------+
  75. | 178245354 |
  76. +-----------+
  77. 1 row in set (0.00 sec)
  78.  
  79. mysql> select id from smalltable where varchar255='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww';
  80. +----------+
  81. | id       |
  82. +----------+
  83. | 78245354 |
  84. +----------+
  85. 1 row in set (0.02 sec)
  86.  
  87. mysql> select id from smalltable where varchar255='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';
  88. +-----------+
  89. | id        |
  90. +-----------+
  91. | 128245354 |
  92. +-----------+
  93. 1 row in set (0.00 sec)
  94.  
  95. mysql> set profiling=0;
  96. Query OK, 0 rows affected (0.00 sec)
  97.  
  98. mysql> show profiles;
  99. +----------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | Query_ID | Duration     | Query                                                                                                                                                      |
  101. +----------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. |        1 | 150.97058275 | select count(*) from smalltable                                                                                                                            |
  103. |        2 |   0.00673750 | select varchar255 from smalltable where id = 178245354                                                                                                     |
  104. |        3 |   0.00032600 | select id from smalltable where varchar255='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'                                          |
  105. |        4 |   0.00024225 | select varchar255 from smalltable where id = 178245354                                                                                                     |
  106. |        5 |   0.12738300 | select varchar255 from smalltable where id = 78245354                                                                                                      |
  107. |        6 |   0.01478350 | select varchar255 from smalltable where id = 128245354                                                                                                     |
  108. |        7 |   0.00030250 | select id from smalltable where varchar255='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'                                          |
  109. |        8 |   0.01827275 | select id from smalltable where varchar255='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww' |
  110. |        9 |   0.00021725 | select id from smalltable where varchar255='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'                                     |
  111. +----------+--------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. 9 rows in set (0.00 sec)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×