mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
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
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains C code routines that are called by the parser
|
||||
** to handle UPDATE statements.
|
||||
**
|
||||
** $Id: update.c,v 1.193 2009/02/20 10:58:42 danielk1977 Exp $
|
||||
** $Id: update.c,v 1.194 2009/02/23 17:33:50 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -343,6 +343,7 @@ void sqlite3Update(
|
||||
/* Begin the database scan
|
||||
*/
|
||||
sqlite3VdbeAddOp2(v, OP_Null, 0, regOldRowid);
|
||||
pTabList->a[0].usesRowid = 1;
|
||||
pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0,
|
||||
WHERE_ONEPASS_DESIRED, 0);
|
||||
if( pWInfo==0 ) goto update_cleanup;
|
||||
|
||||
Reference in New Issue
Block a user