SQLite Forum

alter table RENAME COLUMN took 3 hours
Login
What's the proper way to report a bug in SQLite?

I would be inclined to call this a bug, since this is a small database.  I've only attempted to rename a column twice, in two different tables, but both times it took about 3 hours.  This is not a large database and I have no triggers or references constraints.  I have not done any additional experiments, e.g., in an empty database, since obviously there are other ways to accomplish this.  

I'm running on macOS 10.14.6 (18G3020)

Here is a log of the second column rename:

sqlite> .schema dict_v3
CREATE TABLE dict_v3(
  "Variable / Field Name" TEXT,
  "Form Name" TEXT,
  "Section Header" TEXT,
  "Field Type" TEXT,
  "Field Label" TEXT,
  "Choices, Calculations, OR Slider Labels" TEXT,
  "Field Note" TEXT,
  "Text Validation Type OR Show Slider Number" TEXT,
  "Text Validation Min" TEXT,
  "Text Validation Max" TEXT,
  "Identifier?" TEXT,
  "Branching Logic (Show field only if...)" TEXT,
  "Required Field?" TEXT,
  "Custom Alignment" TEXT,
  "Question Number (surveys only)" TEXT,
  "Matrix Group Name" TEXT,
  "Matrix Ranking?" TEXT,
  "Field Annotation" TEXT
);
sqlite> alter table dict_v3 rename "Variable / Field Name" to variable;
Run Time: real 11144.591 user 11068.905764 sys 20.954366
sqlite> .dbinfo
database page size:  4096
write format:        1
read format:         1
reserved bytes:      0
file change counter: 21589
database page count: 16918
freelist page count: 1
schema cookie:       22987
schema format:       4
default cache size:  0
autovacuum top root: 0
incremental vacuum:  0
text encoding:       1 (utf8)
user version:        0
application id:      0
software version:    3031001
number of tables:    50
number of indexes:   0
number of triggers:  0
number of views:     48
schema size:         532422
data version         3
sqlite> select 11144.591/60;
185.743183333333
Run Time: real 0.000 user 0.000047 sys 0.000019
sqlite> select 11144.591/60/60;
3.09571972222222
Run Time: real 0.000 user 0.000046 sys 0.000008
sqlite>