fts5optimize3.test 1013 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # 2023 Aug 27
  2. #
  3. # The author disclaims copyright to this source code. In place of
  4. # a legal notice, here is a blessing:
  5. #
  6. # May you do good and not evil.
  7. # May you find forgiveness for yourself and forgive others.
  8. # May you share freely, never taking more than you give.
  9. #
  10. #***********************************************************************
  11. #
  12. # TESTRUNNER: superslow
  13. #
  14. source [file join [file dirname [info script]] fts5_common.tcl]
  15. set testprefix fts5optimize2
  16. # If SQLITE_ENABLE_FTS5 is not defined, omit this file.
  17. ifcapable !fts5 {
  18. finish_test
  19. return
  20. }
  21. set nLoop 2500
  22. do_execsql_test 1.0 {
  23. CREATE VIRTUAL TABLE t2 USING fts5(x);
  24. INSERT INTO t2(t2, rank) VALUES('pgsz', 32);
  25. }
  26. do_test 1.1 {
  27. for {set ii 0} {$ii < $nLoop} {incr ii} {
  28. execsql {
  29. INSERT INTO t2 VALUES('abc def ghi');
  30. INSERT INTO t2 VALUES('jkl mno pqr');
  31. INSERT INTO t2(t2, rank) VALUES('merge', -1);
  32. }
  33. }
  34. } {}
  35. do_execsql_test 1.2 {
  36. SELECT count(*) FROM t2('mno')
  37. } $nLoop
  38. finish_test