SQLite

Check-in [9ebee8401b]
Login

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

Overview
Comment:Speed up OP_Column by eliminating some double handling. (CVS 5490)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9ebee8401b68a2bcd49dc750ac394258d554b499
User & Date: danielk1977 2008-07-29 10:18:57.000
Context
2008-07-29
10:26
Add a missing "finish_test" to the end of misc5.test. (CVS 5491) (check-in: 89216b1669 user: danielk1977 tags: trunk)
10:18
Speed up OP_Column by eliminating some double handling. (CVS 5490) (check-in: 9ebee8401b user: danielk1977 tags: trunk)
01:13
Re-used prepared statement from fts3 cursor. Previously, each call to fulltextFilter() finalized any existing prepared statement and prepared a new one. In the case where idxNum has not changed, simply reseting the statement suffices. This provides an order of magnitude speedup in incoming joins against docid. (CVS 5489) (check-in: a08a5f2b12 user: shess tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbe.c.
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.766 2008/07/28 19:34:54 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
** The following global variable is incremented every time a cursor







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.767 2008/07/29 10:18:57 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
** The following global variable is incremented every time a cursor
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
  ** then there are not enough fields in the record to satisfy the
  ** request.  In this case, set the value NULL or to P4 if P4 is
  ** a pointer to a Mem object.
  */
  if( aOffset[p2] ){
    assert( rc==SQLITE_OK );
    if( zRec ){
      if( pDest->flags&MEM_Dyn ){
        sqlite3VdbeSerialGet((u8 *)&zRec[aOffset[p2]], aType[p2], &sMem);
        sMem.db = db; 
        rc = sqlite3VdbeMemCopy(pDest, &sMem);
        assert( !(sMem.flags&MEM_Dyn) );
        if( rc!=SQLITE_OK ){
          goto op_column_out;
        }
      }else{
        sqlite3VdbeSerialGet((u8 *)&zRec[aOffset[p2]], aType[p2], pDest);
      }
    }else{
      len = sqlite3VdbeSerialTypeLen(aType[p2]);
      sqlite3VdbeMemMove(&sMem, pDest);
      rc = sqlite3VdbeMemFromBtree(pCrsr, aOffset[p2], len, pC->isIndex, &sMem);
      if( rc!=SQLITE_OK ){
        goto op_column_out;
      }







<
<
<
|
<
<
<
<
<
|
<







2151
2152
2153
2154
2155
2156
2157



2158





2159

2160
2161
2162
2163
2164
2165
2166
  ** then there are not enough fields in the record to satisfy the
  ** request.  In this case, set the value NULL or to P4 if P4 is
  ** a pointer to a Mem object.
  */
  if( aOffset[p2] ){
    assert( rc==SQLITE_OK );
    if( zRec ){



      sqlite3VdbeMemReleaseExternal(pDest);





      sqlite3VdbeSerialGet((u8 *)&zRec[aOffset[p2]], aType[p2], pDest);

    }else{
      len = sqlite3VdbeSerialTypeLen(aType[p2]);
      sqlite3VdbeMemMove(&sMem, pDest);
      rc = sqlite3VdbeMemFromBtree(pCrsr, aOffset[p2], len, pC->isIndex, &sMem);
      if( rc!=SQLITE_OK ){
        goto op_column_out;
      }