Fossil SCM

Create a temporary index to speed up incremental Git import.

mistachkin 2016-10-26 21:45 trunk
Commit 0fa60142eb3ae667fffb216f405611a31d6ee650
1 file changed +1
--- src/import.c
+++ src/import.c
@@ -1761,10 +1761,11 @@
17611761
** times but only the last tag should be used. And we do not know which
17621762
** occurrence of the tag is the last until the import finishes.
17631763
*/
17641764
db_multi_exec(
17651765
"CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT);"
1766
+ "CREATE INDEX temp.i_xmark ON xmark(trid);"
17661767
"CREATE TEMP TABLE xbranch(tname TEXT UNIQUE, brnm TEXT);"
17671768
"CREATE TEMP TABLE xtag(tname TEXT UNIQUE, tcontent TEXT);"
17681769
);
17691770
17701771
if( markfile_in ){
17711772
--- src/import.c
+++ src/import.c
@@ -1761,10 +1761,11 @@
1761 ** times but only the last tag should be used. And we do not know which
1762 ** occurrence of the tag is the last until the import finishes.
1763 */
1764 db_multi_exec(
1765 "CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT);"
 
1766 "CREATE TEMP TABLE xbranch(tname TEXT UNIQUE, brnm TEXT);"
1767 "CREATE TEMP TABLE xtag(tname TEXT UNIQUE, tcontent TEXT);"
1768 );
1769
1770 if( markfile_in ){
1771
--- src/import.c
+++ src/import.c
@@ -1761,10 +1761,11 @@
1761 ** times but only the last tag should be used. And we do not know which
1762 ** occurrence of the tag is the last until the import finishes.
1763 */
1764 db_multi_exec(
1765 "CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT);"
1766 "CREATE INDEX temp.i_xmark ON xmark(trid);"
1767 "CREATE TEMP TABLE xbranch(tname TEXT UNIQUE, brnm TEXT);"
1768 "CREATE TEMP TABLE xtag(tname TEXT UNIQUE, tcontent TEXT);"
1769 );
1770
1771 if( markfile_in ){
1772

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button