create-postgres.sql 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. CREATE TABLE World (
  2. id integer NOT NULL,
  3. randomNumber integer NOT NULL default 0,
  4. PRIMARY KEY (id)
  5. );
  6. GRANT SELECT, UPDATE ON World to benchmarkdbuser;
  7. INSERT INTO World (id, randomnumber)
  8. SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
  9. CREATE TABLE Fortune (
  10. id integer NOT NULL,
  11. message varchar(2048) NOT NULL,
  12. PRIMARY KEY (id)
  13. );
  14. GRANT SELECT ON Fortune to benchmarkdbuser;
  15. INSERT INTO Fortune (id, message) VALUES (1, 'fortune: No such file or directory');
  16. INSERT INTO Fortune (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');
  17. INSERT INTO Fortune (id, message) VALUES (3, 'After enough decimal places, nobody gives a damn.');
  18. INSERT INTO Fortune (id, message) VALUES (4, 'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
  19. INSERT INTO Fortune (id, message) VALUES (5, 'A computer program does what you tell it to do, not what you want it to do.');
  20. INSERT INTO Fortune (id, message) VALUES (6, 'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
  21. INSERT INTO Fortune (id, message) VALUES (7, 'Any program that runs right is obsolete.');
  22. INSERT INTO Fortune (id, message) VALUES (8, 'A list is only as strong as its weakest link. — Donald Knuth');
  23. INSERT INTO Fortune (id, message) VALUES (9, 'Feature: A bug with seniority.');
  24. INSERT INTO Fortune (id, message) VALUES (10, 'Computers make very fast, very accurate mistakes.');
  25. INSERT INTO Fortune (id, message) VALUES (11, '<script>alert("This should not be displayed in a browser alert box.");</script>');
  26. INSERT INTO Fortune (id, message) VALUES (12, 'フレームワークのベンチマーク');
  27. CREATE TABLE "World" (
  28. id integer NOT NULL,
  29. randomNumber integer NOT NULL default 0,
  30. PRIMARY KEY (id)
  31. );
  32. GRANT SELECT, UPDATE ON "World" to benchmarkdbuser;
  33. INSERT INTO "World" (id, randomnumber)
  34. SELECT x.id, random() * 10000 + 1 FROM generate_series(1,10000) as x(id);
  35. CREATE TABLE "Fortune" (
  36. id integer NOT NULL,
  37. message varchar(2048) NOT NULL,
  38. PRIMARY KEY (id)
  39. );
  40. GRANT SELECT ON "Fortune" to benchmarkdbuser;
  41. INSERT INTO "Fortune" (id, message) VALUES (1, 'fortune: No such file or directory');
  42. INSERT INTO "Fortune" (id, message) VALUES (2, 'A computer scientist is someone who fixes things that aren''t broken.');
  43. INSERT INTO "Fortune" (id, message) VALUES (3, 'After enough decimal places, nobody gives a damn.');
  44. INSERT INTO "Fortune" (id, message) VALUES (4, 'A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1');
  45. INSERT INTO "Fortune" (id, message) VALUES (5, 'A computer program does what you tell it to do, not what you want it to do.');
  46. INSERT INTO "Fortune" (id, message) VALUES (6, 'Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen');
  47. INSERT INTO "Fortune" (id, message) VALUES (7, 'Any program that runs right is obsolete.');
  48. INSERT INTO "Fortune" (id, message) VALUES (8, 'A list is only as strong as its weakest link. — Donald Knuth');
  49. INSERT INTO "Fortune" (id, message) VALUES (9, 'Feature: A bug with seniority.');
  50. INSERT INTO "Fortune" (id, message) VALUES (10, 'Computers make very fast, very accurate mistakes.');
  51. INSERT INTO "Fortune" (id, message) VALUES (11, '<script>alert("This should not be displayed in a browser alert box.");</script>');
  52. INSERT INTO "Fortune" (id, message) VALUES (12, 'フレームワークのベンチマーク');