Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of writing a MariaDB query to generate 100k records
-- See more at https://stackoverflow.com/a/49446214/99923
INSERT INTO T1 (id, created_on, domain, seen_on)
SELECT one.X, two.X, three.X, two.X
FROM (select seq, seq X from seq_1_to_100000) one
LEFT JOIN (select seq, NOW() - INTERVAL seq MINUTE X from seq_1_to_100000) two ON one.seq = two.seq
LEFT JOIN (select seq, CONCAT(seq,'.',seq) X from seq_1_to_100000) three ON one.seq = three.seq;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.