Skip to content

Instantly share code, notes, and snippets.

@vielhuber
Created March 17, 2021 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vielhuber/cc900f830fe5f2c5a24ce5aad7654822 to your computer and use it in GitHub Desktop.
Save vielhuber/cc900f830fe5f2c5a24ce5aad7654822 to your computer and use it in GitHub Desktop.
simulate slow insert query in sqlite #sql
WITH RECURSIVE r(i) AS (
VALUES(0)
UNION ALL
SELECT i FROM r
LIMIT 10000000
)
INSERT INTO test (col1, col2, col3) VALUES ((SELECT i FROM r ORDER BY i LIMIT 1), (SELECT i FROM r ORDER BY i LIMIT 1), (SELECT i FROM r ORDER BY i LIMIT 1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment