-
-
Save schwern/803041e4e3ce6b9457cc1d17eb4dd902 to your computer and use it in GitHub Desktop.
This file contains 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
require 'mysql2' | |
require 'faker' | |
# create table offset_test ( | |
# id bigint primary key auto_increment, | |
# date datetime not null, | |
# index(date) | |
# ) | |
con = Mysql2::Client.new(host: "localhost", database: "test") | |
st = con.prepare('insert into offset_test (date) values (?)') | |
1.upto(200000).each { | |
st.execute Faker::Time.backward(1000) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment