/ Check-in [b58191e9]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Remove some unnecessary code from vdbesort.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sorter-opt
Files: files | file ages | folders
SHA1: b58191e91736b1d978db4127f22867dfe2302f7c
User & Date: dan 2015-03-30 09:58:38
Context
2015-03-30
12:06
Improve performance of multi-field sorts where the first field has a low cardinality. check-in: 601e7b6b user: dan tags: sorter-opt
09:58
Remove some unnecessary code from vdbesort.c. check-in: b58191e9 user: dan tags: sorter-opt
2015-03-28
19:56
Further optimizations for sorting records that begin with integer or text values. check-in: 24fe9f25 user: dan tags: sorter-opt
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbesort.c.

1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
    pTask->pUnpacked = sqlite3VdbeAllocUnpackedRecord(
        pTask->pSorter->pKeyInfo, 0, 0, &pFree
    );
    assert( pTask->pUnpacked==(UnpackedRecord*)pFree );
    if( pFree==0 ) return SQLITE_NOMEM;
    pTask->pUnpacked->nField = pTask->pSorter->pKeyInfo->nField;
    pTask->pUnpacked->errCode = 0;
    if( pTask->pSorter->pKeyInfo->aSortOrder[0] ){
      pTask->pUnpacked->r1 = 1;
      pTask->pUnpacked->r2 = -1;
    }else{
      pTask->pUnpacked->r1 = -1;
      pTask->pUnpacked->r2 = 1;
    }
  }
  return SQLITE_OK;
}


/*
** Merge the two sorted lists p1 and p2 into a single list.







<
<
<
<
<
<
<







1301
1302
1303
1304
1305
1306
1307







1308
1309
1310
1311
1312
1313
1314
    pTask->pUnpacked = sqlite3VdbeAllocUnpackedRecord(
        pTask->pSorter->pKeyInfo, 0, 0, &pFree
    );
    assert( pTask->pUnpacked==(UnpackedRecord*)pFree );
    if( pFree==0 ) return SQLITE_NOMEM;
    pTask->pUnpacked->nField = pTask->pSorter->pKeyInfo->nField;
    pTask->pUnpacked->errCode = 0;







  }
  return SQLITE_OK;
}


/*
** Merge the two sorted lists p1 and p2 into a single list.