Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Improve performance of fts5 writes by writing the "averages" record once at the end of each transaction instead of every time the table is updated. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
2b210d691462b463796e7948399133c2 |
User & Date: | dan 2017-02-27 17:06:56.850 |
Context
2017-02-27
| ||
17:16 | Make PATH handling more robust in the batch tools for MSVC. (check-in: 23a8917e84 user: mistachkin tags: trunk) | |
17:06 | Improve performance of fts5 writes by writing the "averages" record once at the end of each transaction instead of every time the table is updated. (check-in: 2b210d6914 user: dan tags: trunk) | |
16:15 | Add an sqlite3_set_last_insert_rowid() method. Use it to work around fts4 and fts5 modifying the last-insert-rowid unintuitively from within commit processing. (check-in: 952a3906b3 user: dan tags: trunk) | |
Changes
Changes to ext/fts5/fts5_storage.c.
︙ | ︙ | |||
541 542 543 544 545 546 547 | if( rc==SQLITE_OK ){ sqlite3_bind_int64(pDel, 1, iDel); sqlite3_step(pDel); rc = sqlite3_reset(pDel); } } | < < < < < | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | if( rc==SQLITE_OK ){ sqlite3_bind_int64(pDel, 1, iDel); sqlite3_step(pDel); rc = sqlite3_reset(pDel); } } return rc; } /* ** Delete all entries in the FTS5 index. */ int sqlite3Fts5StorageDeleteAll(Fts5Storage *p){ |
︙ | ︙ | |||
749 750 751 752 753 754 755 | /* Write the %_docsize record */ if( rc==SQLITE_OK ){ rc = fts5StorageInsertDocsize(p, iRowid, &buf); } sqlite3_free(buf.p); | < < < < < | 744 745 746 747 748 749 750 751 752 753 754 755 756 757 | /* Write the %_docsize record */ if( rc==SQLITE_OK ){ rc = fts5StorageInsertDocsize(p, iRowid, &buf); } sqlite3_free(buf.p); return rc; } static int fts5StorageCount(Fts5Storage *p, const char *zSuffix, i64 *pnRow){ Fts5Config *pConfig = p->pConfig; char *zSql; int rc; |
︙ | ︙ | |||
1090 1091 1092 1093 1094 1095 1096 | /* ** Flush any data currently held in-memory to disk. */ int sqlite3Fts5StorageSync(Fts5Storage *p, int bCommit){ int rc = SQLITE_OK; i64 iLastRowid = sqlite3_last_insert_rowid(p->pConfig->db); | | | | 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 | /* ** Flush any data currently held in-memory to disk. */ int sqlite3Fts5StorageSync(Fts5Storage *p, int bCommit){ int rc = SQLITE_OK; i64 iLastRowid = sqlite3_last_insert_rowid(p->pConfig->db); if( p->bTotalsValid ){ rc = fts5StorageSaveTotals(p); if( bCommit ) p->bTotalsValid = 0; } if( rc==SQLITE_OK ){ rc = sqlite3Fts5IndexSync(p->pIndex, bCommit); } sqlite3_set_last_insert_rowid(p->pConfig->db, iLastRowid); return rc; } |
︙ | ︙ |