Last active
January 15, 2023 20:47
-
-
Save kovid-rathee/32e91738faa1ca15f14aef7c7e22c593 to your computer and use it in GitHub Desktop.
mysqlslap Scripts for Testing Insert Performance in MySQL WITH and WITHOUT primary keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqlslap --create-schema="tests" \ | |
--concurrency=4 \ | |
--query="insert into test_inserts_with_primary_key select null id, md5(rand()) text_field_1, md5(rand()) text_field_2, curdate() - interval round(rand() * 200) day created_at" \n | |
--number-of-queries=10000000 \ | |
--iterations=1 \ | |
-uroot -p | |
mysqlslap --create-schema="tests" \ | |
--concurrency=4 \ | |
--query="insert into test_inserts_with_primary_key select 10129 id, md5(rand()) text_field_1, md5(rand()) text_field_2, curdate() - interval round(rand() * 200) day created_at" \n | |
--number-of-queries=10000000 \ | |
--iterations=1 \ | |
-uroot -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you please post DDL for the tables?