/ Check-in [b0d31e77]
Login

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

Overview
Comment:When populating an index b-tree as part of a CREATE INDEX or REINDEX statement, distribute cells between up to three siblings in balance_nonroot() instead of four. This produces identical database files, but is slightly faster.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b0d31e779ecf01c5a235443c05f488b177ac3045
User & Date: dan 2012-08-08 14:04:56
Context
2012-08-13
22:05
Refer to the WaitForSingleObjectEx and SetFilePointerEx Win32 functions only for platforms where they are going to be used. check-in: 9888ce92 user: mistachkin tags: trunk
2012-08-08
14:04
When populating an index b-tree as part of a CREATE INDEX or REINDEX statement, distribute cells between up to three siblings in balance_nonroot() instead of four. This produces identical database files, but is slightly faster. check-in: b0d31e77 user: dan tags: trunk
11:55
When building a b-tree as part of a CREATE INDEX or REINDEX statement, attempt to pack keys into pages as tightly as possible. check-in: efea62b9 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  5987   5987     ** way, the remainder of the function does not have to deal with any
  5988   5988     ** overflow cells in the parent page, since if any existed they will
  5989   5989     ** have already been removed.
  5990   5990     */
  5991   5991     i = pParent->nOverflow + pParent->nCell;
  5992   5992     if( i<2 ){
  5993   5993       nxDiv = 0;
  5994         -    nOld = i+1;
  5995   5994     }else{
  5996         -    nOld = 3;
         5995  +    assert( bBulk==0 || bBulk==1 );
  5997   5996       if( iParentIdx==0 ){                 
  5998   5997         nxDiv = 0;
  5999   5998       }else if( iParentIdx==i ){
  6000         -      nxDiv = i-2;
         5999  +      nxDiv = i-2+bBulk;
  6001   6000       }else{
         6001  +      assert( bBulk==0 );
  6002   6002         nxDiv = iParentIdx-1;
  6003   6003       }
  6004         -    i = 2;
         6004  +    i = 2-bBulk;
  6005   6005     }
         6006  +  nOld = i+1;
  6006   6007     if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
  6007   6008       pRight = &pParent->aData[pParent->hdrOffset+8];
  6008   6009     }else{
  6009   6010       pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
  6010   6011     }
  6011   6012     pgno = get4byte(pRight);
  6012   6013     while( 1 ){