]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Preliminary code generation for flex-search. Add a no-op IfUseIndex opcode
authordrh <>
Thu, 12 Jun 2025 19:02:54 +0000 (19:02 +0000)
committerdrh <>
Thu, 12 Jun 2025 19:02:54 +0000 (19:02 +0000)
as a placeholder.

FossilOrigin-Name: 521948c64fc7a043e891e4dc3255bd59a76332c58b34d81057eecdf2fef31a63

12 files changed:
manifest
manifest.uuid
src/vdbe.c
src/where.c
src/wherecode.c
test/autoindex3.test
test/cost.test
test/like3.test
test/tpch01.test
test/whereN.test
test/wherelimit3.test
test/with3.test

index 49b2fefdb24f1bfccdf2057088fe7f85e4c3d32e..22011a9ae24f4c1d83aac1dbafd6a75ae172d351 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Merge\slatest\strunk\senhancements\sand\sfixes\sinto\sthe\sexperimental\nflex-search\sbranch.
-D 2025-06-12T13:40:29.659
+C Preliminary\scode\sgeneration\sfor\sflex-search.\s\sAdd\sa\sno-op\sIfUseIndex\sopcode\nas\sa\splaceholder.
+D 2025-06-12T19:02:54.531
 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -852,7 +852,7 @@ F src/upsert.c 215328c3f91623c520ec8672c44323553f12caeb4f01b1090ebdca99fdf7b4f1
 F src/utf.c 7267c3fb9e2467020507601af3354c2446c61f444387e094c779dccd5ca62165
 F src/util.c 36fb1150062957280777655976f3f9a75db236cb8207a0770ceae8d5ec17fcd3
 F src/vacuum.c 1bacdd0a81d2b5dc1c508fbf0d938c89fa78dd8d5b46ec92686d44030d4f4789
-F src/vdbe.c 8a79078298fdc81f09201fac5b454adb97ee8bf30c6cf412a856a17dd144656d
+F src/vdbe.c c6e9d572514901c879ea16e286bbfa1674f3bebd9284e36f34b96c1116938e37
 F src/vdbe.h 93761ed7c6b8bc19524912fd9b9b587d41bf4f1d0ade650a00dadc10518d8958
 F src/vdbeInt.h 0bc581a9763be385e3af715e8c0a503ba8422c2b7074922faf4bb0d6ae31b15e
 F src/vdbeapi.c 613a6f29efacd6ed83e886b6e52db0fe52ba80a596b0a137608db1948bad90a9
@@ -867,9 +867,9 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
 F src/wal.c b0f848cfba8dd057f77073493cdd542f9125b4cf87941f53e9d0db21604155c8
 F src/wal.h ba252daaa94f889f4b2c17c027e823d9be47ce39da1d3799886bbd51f0490452
 F src/walker.c d5006d6b005e4ea7302ad390957a8d41ed83faa177e412f89bc5600a7462a014
-F src/where.c e20d6cf7de2be13fa9f41ba5e499e183319e4cc56202999146085303a5c4eb63
+F src/where.c 1a663cfc00974dec3e37e378f407ffc5a6ce0c06506b8b7ea27c1fc592746f0e
 F src/whereInt.h b0c5487551dc7821426cac213fd5c194a558cab9dfd4e130d71f7afa6416463c
-F src/wherecode.c b608a9e2e71893bfd2617f354fda0201be521844a0330a53fdc0c490cd80c3a6
+F src/wherecode.c e1e64cd05bbc0381c1c08c354853ea6d3d7cb468641e86ee5e803168d114df0d
 F src/whereexpr.c 2415c8eee5ff89a8b709d7d83d71c1ff986cd720d0520057e1d8a5371339012a
 F src/window.c d01227141f622f24fbe36ca105fbe6ef023f9fd98f1ccd65da95f88886565db5
 F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
@@ -932,7 +932,7 @@ F test/autoanalyze1.test b9cc3f32a990fa56669b668d237c6d53e983554ae80c0604992e188
 F test/autoinc.test 9df9930966dbe92c55ef37a4d89112cfd537be0d0596d397177c12db9e581be0
 F test/autoindex1.test 65931519206bbec71948b11e125af0656435a0937973fe5fed70d776a712911f
 F test/autoindex2.test 12ef578928102baaa0dc23ad397601a2f4ecb0df
-F test/autoindex3.test ca502c8050166ac6107a7b4fe4e951f4d3270a23a958af02b14f1b962b83c4b6
+F test/autoindex3.test 4d0a7a412622eb70a8901d8dbac6dc806f71ec8b80c1a0ea0593c4218e95e8dc
 F test/autoindex4.test 3c2105e9172920e26f950ba3c5823e4972190e022c1e6f260ba476b0af24c593
 F test/autoindex5.test 3fb938cbf4e7f3896563ce04e2a24b0bc653fc6245b4bf3268cd7b20f441d87f
 F test/autovacuum.test 00671369bbf96c6a49989a9425f5b78b94075d6a4b031e5e00000c2c32f365df
@@ -1051,7 +1051,7 @@ F test/corruptK.test ac13504593d89d69690d45479547616ed12644d42b5cb7eeb2e759a76fc
 F test/corruptL.test 652fc8ac0763a6fd3eb28b951d481924167b2d9936083bcc68253b2274a0c8fe
 F test/corruptM.test 7d574320e08c1b36caa3e47262061f186367d593a7e305d35f15289cc2c3e067
 F test/corruptN.test a034bb217bebd8d007625dfb078e76ec3d53515052dbceb68bd47b2c27674d5c
-F test/cost.test cc434a026b1e9d0d98137a147e24e5daf1b1ad09e9ff7da63b34c83ddd136d92
+F test/cost.test 8babd06a35d68f67032b44603c55e95271dd58511d6f50f167c9a8012fba8f80
 F test/count.test cd4bd531066e8d77ef8fe1e3fc8253d042072e117ccab214b290cf83f1602249
 F test/countofview.test 4088e461a10ee33e69803c177a69aa1d7bba81a9ffc2df66d76465a22ca7fdfc
 F test/coveridxscan.test f35c7208dedc4f98e471c569df64c0f95a49f6e072d8dc7c8f99bdee2697de1b
@@ -1405,7 +1405,7 @@ F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200
 F test/lemon-test01.y 70110eff607ab137ccc851edb2bc7e14a6d4f246b5d2d25f82a60b69d87a9ff2
 F test/like.test 0036f8fe548fceabd1496361bfa262f35cf5ed17c794bd15e22e9f3de12e0eb0
 F test/like2.test d3be15fefee3e02fc88942a9b98f26c5339bbdef7783c90023c092c4955fe3d3
-F test/like3.test 3c9be7a0122908d8ead6aa25e47c2b9787eea88e8062926078ea7b3e95c71d99
+F test/like3.test fa69e88f4a66aefa005fcc6c8b3b7e5531e12cad9b24bebb6241d6e5e5e54117
 F test/limit.test 350f5d03c29e7dff9a2cde016f84f8d368d40bcd02fa2b2a52fa10c4bf3cbfaf
 F test/limit2.test 621188fc3e5c3b8d2ef9827e05fa8313792ae563579073136efd25cb65325f1b
 F test/literal.test a65dca9fef86e51b8e45544268e37abbd4bb94ba35fd65f6fdcab2f288cd8f79
@@ -1895,7 +1895,7 @@ F test/tkt3992.test f3e7d548ac26f763b47bc0f750da3d03c81071da
 F test/tkt3997.test a335fa41ca3985660a139df7b734a26ef53284bd
 F test/tkt4018.test 18dbc6617f7a4b90e938d1bd6d26ad18daafaf08
 F test/tokenize.test ce430a7aed48fc98301611429595883fdfcab5d7
-F test/tpch01.test 4479008f85f6f8f25f7ab2cb305d665752b4727fa28a8df3d8e0ad46520c62ff
+F test/tpch01.test 35b799a0c75693eb581ed0f58ce9d4ebe6e397f8b90945b2307a973c5fe5f880
 F test/trace.test a659a9862957f4789e37a92b3bf6d2caf5c86b02cdeefc41e850ae53acf6992a
 F test/trace2.test f5cb67ad3bc09e0c58e8cca78dfd0b5639259983
 F test/trace3.test 2deeac66359c9f007f0fc9fb6336994a5d68fc1a65129f322a9e9546fd537d0a
@@ -2063,12 +2063,12 @@ F test/whereJ.test fc05e374cc9f2dc204148d6c06822c380ad388895fe97a6d335b94a26a08a
 F test/whereK.test 0270ab7f04ba5436fb9156d31d642a1c82727f4c4bfe5ba90d435c78cf44684a
 F test/whereL.test cb115604cc9bd61acbc99a1f1df0eb1ea7a7875a77fef25ba9282f01d10283e1
 F test/whereM.test 0dbc9998783458ddcf3cc078ca7c2951d8b2677d472ecf0028f449ed327c0250
-F test/whereN.test 63a3584b71acfb6963416de82f26c6b1644abc5ca6080c76546b9246734c8803
+F test/whereN.test 025327fc8d756a881dbd7ff20b3180adff8fb1576d0b60ee0b3d764519af78c2
 F test/wherefault.test 6cf2a9c5712952d463d3f45ebee7f6caf400984df51a195d884cfb7eb0e837a7
 F test/wherelfault.test 9012e4ef5259058b771606616bd007af5d154e64cc25fa9fd4170f6411db44e3
 F test/wherelimit.test afb46397c6d7e964e6e294ba3569864a0c570fe3807afc634236c2b752372f31
 F test/wherelimit2.test b9e4bfe7b4d7c2f85f99cf2bd2c51369378d04b1f3d1b60557423752003bfd90
-F test/wherelimit3.test 22d73e046870cf8bbe15573eda6b432b07ebe64a88711f9f849c6b3667c1fae6
+F test/wherelimit3.test b856e699769cb904af7a3e7b2bd32e28f828902acb13517956fcfc81377f0826
 F test/widetab1.test c296a98e123762de79917350e45fa33fdf88577a2571eb3a64c8bf7e44ef74d1
 F test/win32heap.test 1ec2ce646aee491ec23bfcdfd005b33c79f13bf91467966f374a76ffe7c7e85f
 F test/win32lock.test e56d7a9b6cf9d5f3867c2dd19ff36c5326881e4038c6867610ecb3a9868ea4eb
@@ -2099,7 +2099,7 @@ F test/windowfault.test 15094c1529424e62f798bc679e3fe9dfab6e8ba2f7dfe8c923b6248c
 F test/windowpushd.test c420e2265f0e09a0e798d0513a660d71b51602088d81b3dbd038918ee1339dcc
 F test/with1.test 1ee171d7c306ab8b0771f3511d870f56c735607729836585bbceb1fc2f47e0b1
 F test/with2.test 181674a6cc86a601ca2ac052741cdfad5b529e07e870435d2f6cdb92d589ff17
-F test/with3.test e30369ea27aa27eb1bda4c5e510c8a9f782c8afd2ab99d1a02b8a7f25a5d3e65
+F test/with3.test a39c0003d6e6d8bfff3461f66a1d53edab04715e309a303e17b2065837ef9f25
 F test/with4.test 257be66c0c67fee1defbbac0f685c3465e2cad037f21ce65f23f86084f198205
 F test/with5.test 6248213c41fab36290b5b73aa3f937309dfba337004d9d8434c3fabc8c7d4be8
 F test/with6.test 281e4861b5e517f6c3c2f08517a520c1e2ee7c11966545d3901f258a4fe8ef76
@@ -2208,8 +2208,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 1ad0169b022b280bcaaf94a7fa231591be96b514230ab5c98fbf15cd7df842dd
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e93048425bb7183efc047d0f6b39f214491fee869b8ed8006c6ec6eb0e3ec417 a95d126e1330e1b83f42b51f97c4c216622cf38062f3b5d72ccb76313187e850
-R 8746ac21dac213bf45ceade3f4ad3e82
+P 51c89c886f1846e297d249c85d18b047c76ba352ed998e48220e96a6a567b4a8
+R 5d5f07366627e69538d51ee50b1e88c9
 U drh
-Z be1dd962742be330d7e4cccb4f2618fb
+Z 57fa0baa0107ffc7b174660d67d1252c
 # Remove this line to create a well-formed Fossil manifest.
index 91d577cafac7579fa624ea8008dd1ac6aab6334d..d0f66ba0e2979944d1de4d280982a2d602c8dc84 100644 (file)
@@ -1 +1 @@
-51c89c886f1846e297d249c85d18b047c76ba352ed998e48220e96a6a567b4a8
+521948c64fc7a043e891e4dc3255bd59a76332c58b34d81057eecdf2fef31a63
index f453a3f13a8b1abde8c47c55a8eafd1200610996..57afac21a94172871c9e2d1684116bfb98ac605e 100644 (file)
@@ -3791,6 +3791,34 @@ case OP_EstPos: {        /* out2 */
   break;
 }
 
+/* Opcode: IfUseIndex P1 P2 P3 P4 *
+**
+** This opcode decides whether it will be faster to use the index
+** in cursor P1 or to do a full table scan on the original table.
+** If the index on cursor P1 should be used, a jump is made to P2.
+** (That is the usual case).  If it seems like it might be faster to
+** do a full table scan, then fall through.
+**
+** The P3 and P4 arguments define a key in the same format as OP_SeekGT
+** and similar.  That key is the last key in the range of index entries
+** that match the join condition.  This opcode works by estimating the
+** number of rows in the index P1 between the current row and the last
+** row that matches P3,P4.  If the number of rows that match is a significant
+** fraction of the total number of rows in the index, then it might be
+** faster to do a scan of the original table, and so this opcode falls.
+** If the estimated number of matching rows is small compared to the
+** total number of rows in the index, then the jump to P2 is taken
+** and cursor P1 is unchanged.
+*/
+case OP_IfUseIndex: {    /* jump */
+  /**** Temporary Hack:
+  ***** Take the jump if Tuning(0) is 0.  Fall through if non-zero.
+  ****/
+  if( Tuning(0) ) goto jump_to_p2;
+  break;
+}
+
+
 /* Opcode: Savepoint P1 * * P4 *
 **
 ** Open, release or rollback the savepoint named by parameter P4, depending
@@ -4899,15 +4927,19 @@ case OP_SeekGT: {       /* jump0, in3, group, ncycle */
     ** with the same key.
     */
     if( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ) ){
-      eqOnly = 1;
+#ifdef SQLITE_DEBUG
+      VdbeOp *pNext = &pOp[1];
+      if( pNext->opcode==OP_IfUseIndex ) pNext = &p->aOp[pNext->p2];
       assert( pOp->opcode==OP_SeekGE || pOp->opcode==OP_SeekLE );
-      assert( pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT );
-      assert( pOp->opcode==OP_SeekGE || pOp[1].opcode==OP_IdxLT );
-      assert( pOp->opcode==OP_SeekLE || pOp[1].opcode==OP_IdxGT );
-      assert( pOp[1].p1==pOp[0].p1 );
-      assert( pOp[1].p2==pOp[0].p2 );
-      assert( pOp[1].p3==pOp[0].p3 );
-      assert( pOp[1].p4.i==pOp[0].p4.i );
+      assert( pNext->opcode==OP_IdxLT || pNext->opcode==OP_IdxGT );
+      assert( pOp->opcode==OP_SeekGE || pNext->opcode==OP_IdxLT );
+      assert( pOp->opcode==OP_SeekLE || pNext->opcode==OP_IdxGT );
+      assert( pNext->p1==pOp[0].p1 );
+      assert( pNext->p2==pOp[0].p2 );
+      assert( pNext->p3==pOp[0].p3 );
+      assert( pNext->p4.i==pOp[0].p4.i );
+#endif /* SQLITE_DEBUG */
+      eqOnly = 1;
     }
 
     nField = pOp->p4.i;
@@ -4992,7 +5024,7 @@ seek_not_found:
   VdbeBranchTaken(res!=0,2);
   if( res ){
     goto jump_to_p2;
-  }else if( eqOnly ){
+  }else if( eqOnly && pOp[1].opcode!=OP_IfUseIndex ){
     assert( pOp[1].opcode==OP_IdxLT || pOp[1].opcode==OP_IdxGT );
     pOp++; /* Skip the OP_IdxLt or OP_IdxGT that follows */
   }
index 647486ac5481071f41e9832e507b9532f392ef08..01362d1a978c35775b1c9b93bb0a8695518d108d 100644 (file)
@@ -7158,7 +7158,12 @@ WhereInfo *sqlite3WhereBegin(
           wherePartIdxExpr(
               pParse, pIx, pIx->pPartIdxWhere, 0, iIndexCur, pTabItem
           );
-        }else if( pIx->aiRowLogEst[pLoop->u.btree.nEq]>65 ){
+        }else if( pIx->aiRowLogEst[pLoop->u.btree.nEq]>65
+               && 0==(pLoop->wsFlags & (WHERE_AUTO_INDEX
+                                       |WHERE_IDX_ONLY
+                                       |WHERE_EXPRIDX))
+               && 0!=(pLoop->wsFlags & (WHERE_BOTH_LIMIT|WHERE_CONSTRAINT))
+        ){
           pLoop->wsFlags |= WHERE_FLEX_SEARCH;
         }
       }
index a59712077619f81a4d6eb0b7f76f953ec5644574..49e5f90c563fff82730b50ff7d6b0d076db73e2d 100644 (file)
@@ -149,7 +149,7 @@ void sqlite3WhereAddExplainText(
 
     sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
     str.printfFlags = SQLITE_PRINTF_INTERNAL;
-#if 0
+#if 1
     if( (flags & WHERE_FLEX_SEARCH)!=0 && isSearch ){
       sqlite3_str_appendf(&str, "FLEX-SEARCH %S", pItem);
     }else
@@ -2146,6 +2146,15 @@ Bitmask sqlite3WhereCodeOneLoopStart(
     if( zStartAff ) sqlite3DbNNFreeNN(db, zStartAff);
     if( zEndAff ) sqlite3DbNNFreeNN(db, zEndAff);
 
+    if( pLoop->wsFlags & WHERE_FLEX_SEARCH ){
+      int jIfIdx;
+      /*** First flex-search block ***/
+      jIfIdx = sqlite3VdbeAddOp4Int(v, OP_IfUseIndex, iIdxCur, 0,
+                                    regBase, nConstraint);
+      /*** Other stuff here ***/
+      sqlite3VdbeJumpHere(v, jIfIdx);
+    }
+
     /* Top of the loop body */
     pLevel->p2 = sqlite3VdbeCurrentAddr(v);
 
@@ -2243,6 +2252,10 @@ Bitmask sqlite3WhereCodeOneLoopStart(
       assert( pLevel->p5==0 );
     }
     if( omitTable ) pIdx = 0;
+
+    /*** Insert flex-scan block 2 here ****/
+    /*** Fix-up pLevel->op and similar ****/
+
   }else
 
 #ifndef SQLITE_OMIT_OR_OPTIMIZATION
index aa6aa00128f1d315009897fc0ca8bd5281d7e37d..26d97fd88da907185e553e48b3d29ec84a804a8d 100644 (file)
@@ -85,7 +85,7 @@ do_eqp_test 220 {
   select count(*) from u, v where u.b = v.b and v.e > 34;
 } {
   QUERY PLAN
-  |--SEARCH v USING INDEX ve (e>?)
+  |--FLEX-SEARCH v USING INDEX ve (e>?)
   |--BLOOM FILTER ON u (b=?)
   `--SEARCH u USING AUTOMATIC COVERING INDEX (b=?)
 }
@@ -119,10 +119,10 @@ do_eqp_test 310 {
   QUERY PLAN
   |--CO-ROUTINE children
   |  |--SETUP
-  |  |  `--SEARCH t2 USING INDEX x1 (pid=? AND rx=?)
+  |  |  `--FLEX-SEARCH t2 USING INDEX x1 (pid=? AND rx=?)
   |  `--RECURSIVE STEP
   |     |--SCAN children
-  |     `--SEARCH t2 USING INDEX x1 (pid=? AND rx=?)
+  |     `--FLEX-SEARCH t2 USING INDEX x1 (pid=? AND rx=?)
   `--SCAN children
 }  
 
index 6106caba8ca934b63744864faea42c4045de972b..29f30614595bf50b4e8a9f61837c5f6fc0a4c4a4 100644 (file)
@@ -110,7 +110,7 @@ do_eqp_test 5.3 {
   SELECT * FROM t2 WHERE x BETWEEN ? AND ? ORDER BY rowid;
 } {
   QUERY PLAN
-  |--SEARCH t2 USING INDEX t2i1 (x>? AND x<?)
+  |--FLEX-SEARCH t2 USING INDEX t2i1 (x>? AND x<?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
index 03681606c3e9dc9ef995b2e21988f7db63356c5a..f779f5d8be60ef7f2ea92aae562a8ee0e3750621 100644 (file)
@@ -252,26 +252,26 @@ do_eqp_test like3-6.210 {
   SELECT * FROM t2 WHERE path LIKE 'a%';
 } {
   QUERY PLAN
-  `--SEARCH t2 USING INDEX t2path (path>? AND path<?)
+  `--FLEX-SEARCH t2 USING INDEX t2path (path>? AND path<?)
 }
 do_eqp_test like3-6.220 {
   SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '\';
 } {
   QUERY PLAN
-  `--SEARCH t2 USING INDEX t2path (path>? AND path<?)
+  `--FLEX-SEARCH t2 USING INDEX t2path (path>? AND path<?)
 }
 db eval {PRAGMA case_sensitive_like=ON}
 do_eqp_test like3-6.230 {
   SELECT * FROM t2 WHERE path LIKE 'a%';
 } {
   QUERY PLAN
-  `--SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
+  `--FLEX-SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
 }
 do_eqp_test like3-6.240 {
   SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '\';
 } {
   QUERY PLAN
-  `--SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
+  `--FLEX-SEARCH t2 USING INDEX t2path2 (path>? AND path<?)
 }
 }
 
index 338ac48a07d8dab74ba933deb5ed1e3f93620a77..ac52498b7dc6aaf6c10a4889e395ec2a52b34b4d 100644 (file)
@@ -189,7 +189,7 @@ order by
     revenue desc;
 } {
   QUERY PLAN
-  |--SEARCH orders USING INDEX odi (O_ORDERDATE>? AND O_ORDERDATE<?)
+  |--FLEX-SEARCH orders USING INDEX odi (O_ORDERDATE>? AND O_ORDERDATE<?)
   |--SEARCH customer USING INDEX cpki (C_CUSTKEY=?)
   |--SEARCH nation USING INDEX npki (N_NATIONKEY=?)
   |--SEARCH lineitem USING INDEX lpki (L_ORDERKEY=?)
index b9b889fa283edab6cb9fc45e1d7076ecb521df53..9e71a42cb8450c171dba30df601ff1bdf7190f95 100644 (file)
@@ -93,7 +93,7 @@ do_eqp_test 1.1 {
   |--CO-ROUTINE (subquery-xxxxxx)
   |  |--SEARCH DS USING COVERING INDEX ds1 (name=?)
   |  |--SEARCH R USING COVERING INDEX rule2 (dsid=?)
-  |  |--SEARCH V USING INDEX v1 (rid=?)
+  |  |--FLEX-SEARCH V USING INDEX v1 (rid=?)
   |  `--USE TEMP B-TREE FOR ORDER BY
   `--SCAN (subquery-xxxxxx)
 }
index dea3e97d86a7e7c6595a6206739cf75fdc63ca0a..09895da0fcb3bb73a629dce669d5b043dcfa158a 100644 (file)
@@ -29,7 +29,7 @@ do_eqp_test 1.1 {
   SELECT * FROM t1 WHERE a>=100 AND a<300 ORDER BY b LIMIT 5;
 } {
   QUERY PLAN
-  |--SEARCH t1 USING INDEX t1a (a>? AND a<?)
+  |--FLEX-SEARCH t1 USING INDEX t1a (a>? AND a<?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 ifcapable stat4 {
@@ -46,7 +46,7 @@ do_eqp_test 1.3 {
   SELECT * FROM t1 WHERE a>=100 AND a<300 ORDER BY b LIMIT $::N;
 } {
   QUERY PLAN
-  |--SEARCH t1 USING INDEX t1a (a>? AND a<?)
+  |--FLEX-SEARCH t1 USING INDEX t1a (a>? AND a<?)
   `--USE TEMP B-TREE FOR ORDER BY
 }
 
index 9b110debf3a33874eb9a4170e8922ba985d7f7ea..2aa1ce3a7b32599928f2e1f3682386ffbd92a589 100644 (file)
@@ -95,7 +95,7 @@ ifcapable analyze {
     |  `--RECURSIVE STEP
     |     `--SCAN cnt
     |--SCAN cnt
-    `--SEARCH y1 USING INDEX y1a (a=?)
+    `--FLEX-SEARCH y1 USING INDEX y1a (a=?)
   }]
 
   do_eqp_test 3.1.3 {