SQLite

Check-in [5329957591]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a compound-query test to the speedtest1 test program.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 532995759114ab7a7cba18cc9d8820d78eb1a96e
User & Date: drh 2014-02-09 23:59:28.966
Context
2014-02-10
03:21
Faster and smaller implementation of sqlite3_value_type(). (check-in: 5708bc24b8 user: drh tags: trunk)
2014-02-09
23:59
Add a compound-query test to the speedtest1 test program. (check-in: 5329957591 user: drh tags: trunk)
18:02
Use the WITH clause to help resolve names for SELECT statements on the left of a compound query. Proposed fix for ticket [31a19d11b97088296a]. (check-in: 67bfd59d90 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to test/speedtest1.c.
774
775
776
777
778
779
780

781
782
783
784
785
786
787
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788







+







    "....2...6"
    ".6....28."
    "...419..5"
    "....8..79",
  };
  const char *zPuz;
  double rSpacing;
  int nElem;

  if( g.szTest<25 ){
    zPuz = azPuzzle[0];
  }else if( g.szTest<70 ){
    zPuz = azPuzzle[1];
  }else{
    zPuz = azPuzzle[2];
868
869
870
871
872
873
874














875
876
877
878
879
880
881
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896







+
+
+
+
+
+
+
+
+
+
+
+
+
+







   "    SELECT group_concat( substr(' .+*#', 1+min(iter/7,4), 1), '') \n"
   "    FROM m2 GROUP BY cy\n"
   "  )\n"
   "SELECT group_concat(rtrim(t),x'0a') FROM a;"
  );
  sqlite3_bind_double(g.pStmt, 1, rSpacing*.05);
  sqlite3_bind_double(g.pStmt, 2, rSpacing);
  speedtest1_run();
  speedtest1_end_test();

  nElem = 10000*g.szTest;
  speedtest1_begin_test(400, "EXCEPT operator on %d-element tables", nElem);
  speedtest1_prepare(
    "WITH RECURSIVE \n"
    "  t1(x) AS (VALUES(2) UNION ALL SELECT x+2 FROM t1 WHERE x<%d),\n"
    "  t2(y) AS (VALUES(3) UNION ALL SELECT y+3 FROM t2 WHERE y<%d)\n"
    "SELECT count(x), avg(x) FROM (\n"
    "  SELECT x FROM t1 EXCEPT SELECT y FROM t2 ORDER BY 1\n"
    ");",
    nElem, nElem
  );
  speedtest1_run();
  speedtest1_end_test();

}

/*
** A testset used for debugging speedtest1 itself.