/ Check-in [9daf4e7d]
Login

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

Overview
Comment:When TEMP files are in memory, also put the massive TEMP file used by the VACUUM command in memory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9daf4e7d07769f25b3a579d80e7fada4e52344b1
User & Date: drh 2010-03-02 23:34:55
References
2010-03-03
00:02
When TEMP files are in memory, also put the massive TEMP file used by the VACUUM command in memory. This is a cherry-pick merge of [9daf4e7d07] check-in: e5342234 user: drh tags: branch-3.6.22
Context
2010-03-03
14:23
Modify the command line tool to disable all mutexes. The command line tool is single-threaded. check-in: 00e56790 user: dan tags: trunk
2010-03-02
23:34
When TEMP files are in memory, also put the massive TEMP file used by the VACUUM command in memory. check-in: 9daf4e7d user: drh tags: trunk
2010-02-26
16:37
Rename the sqlite_compile_option_*() SQL functions to sqlite_compileoption_*() for consistency with the C/C++ interface. check-in: dd4962aa user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/pcache.c.

185
186
187
188
189
190
191

192
193
194
195
196
197
198
** are no outstanding page references when this function is called.
*/
void sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
  assert( pCache->nRef==0 && pCache->pDirty==0 );
  if( pCache->pCache ){
    sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
    pCache->pCache = 0;

  }
  pCache->szPage = szPage;
}

/*
** Try to obtain a page from the cache.
*/







>







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
** are no outstanding page references when this function is called.
*/
void sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
  assert( pCache->nRef==0 && pCache->pDirty==0 );
  if( pCache->pCache ){
    sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
    pCache->pCache = 0;
    pCache->pPage1 = 0;
  }
  pCache->szPage = szPage;
}

/*
** Try to obtain a page from the cache.
*/

Changes to src/vacuum.c.

134
135
136
137
138
139
140



141

142
143
144
145
146
147
148
  ** (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but
  ** that actually made the VACUUM run slower.  Very little journalling
  ** actually occurs when doing a vacuum since the vacuum_db is initially
  ** empty.  Only the journal header is written.  Apparently it takes more
  ** time to parse and run the PRAGMA to turn journalling off than it does
  ** to write the journal header file.
  */



  zSql = "ATTACH '' AS vacuum_db;";

  rc = execSql(db, pzErrMsg, zSql);
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  pDb = &db->aDb[db->nDb-1];
  assert( strcmp(db->aDb[db->nDb-1].zName,"vacuum_db")==0 );
  pTemp = db->aDb[db->nDb-1].pBt;

  /* The call to execSql() to attach the temp database has left the file







>
>
>
|
>







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
  ** (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but
  ** that actually made the VACUUM run slower.  Very little journalling
  ** actually occurs when doing a vacuum since the vacuum_db is initially
  ** empty.  Only the journal header is written.  Apparently it takes more
  ** time to parse and run the PRAGMA to turn journalling off than it does
  ** to write the journal header file.
  */
  if( sqlite3TempInMemory(db) ){
    zSql = "ATTACH ':memory:' AS vacuum_db;";
  }else{
    zSql = "ATTACH '' AS vacuum_db;";
  }
  rc = execSql(db, pzErrMsg, zSql);
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  pDb = &db->aDb[db->nDb-1];
  assert( strcmp(db->aDb[db->nDb-1].zName,"vacuum_db")==0 );
  pTemp = db->aDb[db->nDb-1].pBt;

  /* The call to execSql() to attach the temp database has left the file