搜尋
首頁資料庫mysql教程mysqlslap压力测试工具_MySQL

bitsCN.com

mysqlslap压力测试工具

 

mysqlslap 是从mysql 5.1.4版开始带的一个mysql测试工具。

[root@aeolus1 ~]# mysqlslap --help

 

mysqlslap  Ver 1.0 Distrib 5.5.31, for Linux (x86_64)

Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

 

Run a query multiple times against the server.

 

Usage: mysqlslap [OPTIONS]

 

Default options are read from the following files in the given order:

/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf 

The following groups are read: mysqlslap client

The following options may be given as the first argument:

--print-defaults        Print the program argument list and exit.

--no-defaults           Don't read default options from any option file.

--defaults-file=#       Only read default options from the given file #.

--defaults-extra-file=# Read this file after the global files are read.

  -?, --help          Display this help and exit.

  -a, --auto-generate-sql 

                      Generate SQL where not supplied by file or command line.

  --auto-generate-sql-add-autoincrement 

                      Add an AUTO_INCREMENT column to auto-generated tables.

  --auto-generate-sql-execute-number=# 

                      Set this number to generate a set number of queries to

                      run.

  --auto-generate-sql-guid-primary 

                      Add GUID based primary keys to auto-generated tables.

  --auto-generate-sql-load-type=name 

                      Specify test load type: mixed, update, write, key, or

                      read; default is mixed.

  --auto-generate-sql-secondary-indexes=# 

                      Number of secondary indexes to add to auto-generated

                      tables.

  --auto-generate-sql-unique-query-number=# 

                      Number of unique queries to generate for automatic tests.

  --auto-generate-sql-unique-write-number=# 

                      Number of unique queries to generate for

                      auto-generate-sql-write-number.

  --auto-generate-sql-write-number=# 

                      Number of row inserts to perform for each thread (default

                      is 100).

  --commit=#          Commit records every X number of statements.

  -C, --compress      Use compression in server/client protocol.

  -c, --concurrency=name 

                      Number of clients to simulate for query to run.

  --create=name       File or string to use create tables.

  --create-schema=name 

                      Schema to run tests in.

  --csv[=name]        Generate CSV output to named file or to stdout if no file

                      is named.

  -#, --debug[=#]     This is a non-debug version. Catch this and exit.

  --debug-check       Check memory and open file usage at exit.

  -T, --debug-info    Print some debug info at exit.

  --default-auth=name Default authentication client-side plugin to use.

  -F, --delimiter=name 

                      Delimiter to use in SQL statements supplied in file or

                      command line.

  --detach=#          Detach (close and reopen) connections after X number of

                      requests.

  --enable-cleartext-plugin 

                      Enable/disable the clear text authentication plugin.

  -e, --engine=name   Storage engine to use for creating the table.

  -h, --host=name     Connect to host.

  -i, --iterations=#  Number of times to run the tests.

  --no-drop           Do not drop the schema after the test.

  -x, --number-char-cols=name 

                      Number of VARCHAR columns to create in table if

                      specifying --auto-generate-sql.

  -y, --number-int-cols=name 

                      Number of INT columns to create in table if specifying

                      --auto-generate-sql.

  --number-of-queries=# 

                      Limit each client to this number of queries (this is not

                      exact).

  --only-print        Do not connect to the databases, but instead print out

                      what would have been done.

  -p, --password[=name] 

                      Password to use when connecting to server. If password is

                      not given it's asked from the tty.

  --plugin-dir=name   Directory for client-side plugins.

  -P, --port=#        Port number to use for connection.

  --post-query=name   Query to run or file containing query to execute after

                      tests have completed.

  --post-system=name  system() string to execute after tests have completed.

  --pre-query=name    Query to run or file containing query to execute before

                      running tests.

  --pre-system=name   system() string to execute before running tests.

  --protocol=name     The protocol to use for connection (tcp, socket, pipe,

                      memory).

  -q, --query=name    Query to run or file containing query to run.

  -s, --silent        Run program in silent mode - no output.

  -S, --socket=name   The socket file to use for connection.

  -u, --user=name     User for login if not current user.

  -v, --verbose       More verbose output; you can use this multiple times to

                      get even more verbose output.

  -V, --version       Output version information and exit.
 

bitsCN.com
陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
mysql:blob和其他無-SQL存儲,有什麼區別?mysql:blob和其他無-SQL存儲,有什麼區別?May 13, 2025 am 12:14 AM

mysql'sblobissuitableForStoringBinaryDataWithInareLationalDatabase,而ilenosqloptionslikemongodb,redis和calablesolutionsolutionsolutionsoluntionsoluntionsolundortionsolunsonstructureddata.blobobobissimplobisslowdeperformberbutslowderformandperformancewithlararengedata;

mySQL添加用戶:語法,選項和安全性最佳實踐mySQL添加用戶:語法,選項和安全性最佳實踐May 13, 2025 am 12:12 AM

toaddauserinmysql,使用:createUser'username'@'host'Indessify'password'; there'showtodoitsecurely:1)choosethehostcarecarefullytocon trolaccess.2)setResourcelimitswithoptionslikemax_queries_per_hour.3)usestrong,iniquepasswords.4)Enforcessl/tlsconnectionswith

MySQL:如何避免字符串數據類型常見錯誤?MySQL:如何避免字符串數據類型常見錯誤?May 13, 2025 am 12:09 AM

toAvoidCommonMistakeswithStringDatatatPesInMysQl,CloseStringTypenuances,chosethirtightType,andManageEngencodingAndCollat​​ionsEttingSefectery.1)usecharforfixed lengengtrings,varchar forvariable-varchar forbariaible length,andtext/blobforlargerdataa.2 seterters seterters seterters

mySQL:字符串數據類型和枚舉?mySQL:字符串數據類型和枚舉?May 13, 2025 am 12:05 AM

mysqloffersechar,varchar,text,and denumforstringdata.usecharforfixed Lengttrings,varcharerforvariable長度,文本forlarger文本,andenumforenforcingDataAntegrityWithaEtofValues。

mysql blob:如何優化斑點請求mysql blob:如何優化斑點請求May 13, 2025 am 12:03 AM

優化MySQLBLOB請求可以通過以下策略:1.減少BLOB查詢頻率,使用獨立請求或延遲加載;2.選擇合適的BLOB類型(如TINYBLOB);3.將BLOB數據分離到單獨表中;4.在應用層壓縮BLOB數據;5.對BLOB元數據建立索引。這些方法結合實際應用中的監控、緩存和數據分片,可以有效提升性能。

將用戶添加到MySQL:完整的教程將用戶添加到MySQL:完整的教程May 12, 2025 am 12:14 AM

掌握添加MySQL用戶的方法對於數據庫管理員和開發者至關重要,因為它確保數據庫的安全性和訪問控制。 1)使用CREATEUSER命令創建新用戶,2)通過GRANT命令分配權限,3)使用FLUSHPRIVILEGES確保權限生效,4)定期審計和清理用戶賬戶以維護性能和安全。

掌握mySQL字符串數據類型:varchar vs.文本與char掌握mySQL字符串數據類型:varchar vs.文本與charMay 12, 2025 am 12:12 AM

chosecharforfixed-lengthdata,varcharforvariable-lengthdata,andtextforlargetextfield.1)chariseffity forconsistent-lengthdatalikecodes.2)varcharsuitsvariable-lengthdatalikenames,ballancingflexibilitibility andperformance.3)

MySQL:字符串數據類型和索引:最佳實踐MySQL:字符串數據類型和索引:最佳實踐May 12, 2025 am 12:11 AM

在MySQL中處理字符串數據類型和索引的最佳實踐包括:1)選擇合適的字符串類型,如CHAR用於固定長度,VARCHAR用於可變長度,TEXT用於大文本;2)謹慎索引,避免過度索引,針對常用查詢創建索引;3)使用前綴索引和全文索引優化長字符串搜索;4)定期監控和優化索引,保持索引小巧高效。通過這些方法,可以在讀取和寫入性能之間取得平衡,提升數據庫效率。

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

MantisBT

MantisBT

Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

EditPlus 中文破解版

EditPlus 中文破解版

體積小,語法高亮,不支援程式碼提示功能

VSCode Windows 64位元 下載

VSCode Windows 64位元 下載

微軟推出的免費、功能強大的一款IDE編輯器

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

強大的PHP整合開發環境

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )專業的PHP整合開發工具