SQLite

Check-in [774d5ff857]
Login

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

Overview
Comment:Get the index-only optimization working for OR queries.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | nextgen-query-plan-exp
Files: files | file ages | folders
SHA1: 774d5ff857cfad3471401ed518ed0959eb912e6c
User & Date: drh 2013-06-04 18:03:22.637
Context
2013-06-04
18:27
Restore the PRAGMA reverse_unordered_selects behavior. (check-in: f49cd6c4e7 user: drh tags: nextgen-query-plan-exp)
18:03
Get the index-only optimization working for OR queries. (check-in: 774d5ff857 user: drh tags: nextgen-query-plan-exp)
15:31
Test case updates. (check-in: 0360fec7c0 user: drh tags: nextgen-query-plan-exp)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/where.c.
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
          */
          pSubLoop = pSubWInfo->a[0].pWLoop;
          if( (pSubLoop->wsFlags & WHERE_INDEXED)!=0
           && (pSubLoop->wsFlags & WHERE_TEMP_INDEX)==0
           && (ii==0 || pSubLoop->u.btree.pIndex==pCov)
          ){
            assert( pSubWInfo->a[0].iIdxCur==iCovCur );
            pCov = pLoop->u.btree.pIndex;
          }else{
            pCov = 0;
          }

          /* Finish the loop through table entries that match term pOrTerm. */
          sqlite3WhereEnd(pSubWInfo);
        }







|







3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
          */
          pSubLoop = pSubWInfo->a[0].pWLoop;
          if( (pSubLoop->wsFlags & WHERE_INDEXED)!=0
           && (pSubLoop->wsFlags & WHERE_TEMP_INDEX)==0
           && (ii==0 || pSubLoop->u.btree.pIndex==pCov)
          ){
            assert( pSubWInfo->a[0].iIdxCur==iCovCur );
            pCov = pSubLoop->u.btree.pIndex;
          }else{
            pCov = 0;
          }

          /* Finish the loop through table entries that match term pOrTerm. */
          sqlite3WhereEnd(pSubWInfo);
        }