diff options
author | danielk1977 <danielk1977@noemail.net> | 2009-02-23 17:33:49 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2009-02-23 17:33:49 +0000 |
commit | e2d7b24d0845001051956223cccd3eae73fcbd3e (patch) | |
tree | 0b05f743663f9caa3683e639b9d6c2bd06d0807e /src/expr.c | |
parent | 699b3d4f89f2d97ce5699eaf1931243a3d8dc488 (diff) | |
download | sqlite-e2d7b24d0845001051956223cccd3eae73fcbd3e.tar.gz sqlite-e2d7b24d0845001051956223cccd3eae73fcbd3e.zip |
Scan an index instead of a table for "SELECT count(*) FROM <tbl>" queries. Because an index is usually smaller than a table on disk, this saves some IO. (CVS 6315)
FossilOrigin-Name: 294ba6f743c9132dce0e73da480bd3c2071e7239
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/expr.c b/src/expr.c index af9938220..4b92d6c0f 100644 --- a/src/expr.c +++ b/src/expr.c @@ -12,7 +12,7 @@ ** This file contains routines used for analyzing expressions and ** for generating VDBE code that evaluates expressions in SQLite. ** -** $Id: expr.c,v 1.414 2009/02/20 10:58:42 danielk1977 Exp $ +** $Id: expr.c,v 1.415 2009/02/23 17:33:50 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -931,6 +931,7 @@ SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){ pNewItem->pOn = sqlite3ExprDup(db, pOldItem->pOn, flags); pNewItem->pUsing = sqlite3IdListDup(db, pOldItem->pUsing); pNewItem->colUsed = pOldItem->colUsed; + pNewItem->usesRowid = pOldItem->usesRowid; } return pNew; } |