prpr
Well-Known Member
It won't unless you issue a "vacuum" command.The actual channel.db file didn't get any smaller though, despite deleting a significant number of records
It won't unless you issue a "vacuum" command.The actual channel.db file didn't get any smaller though, despite deleting a significant number of records
humax# cd /var/lib/humaxtv
humax# cp channel.db channel.db~
humax# /etc/init.d/S90settop shut
humax# sqlite3 channel.db
SQLite version 3.8.7.4 2014-12-09 01:34:36
Enter ".help" for usage hints.
sqlite> delete from TBL_SVC where uslcn = 108;
sqlite>
humax# sync
humax# reboot
humax# /etc/init.d/S90settop shut
humax# cd /var/lib/humaxtv
umax# sqlite3 channel.db
SQLite version 3.8.7.4 2014-12-09 01:34:36
Enter ".help" for usage hints.
sqlite> select svcidx from TBL_SVC where uslcn = 108;
... proves 108 is not in the current database ...
sqlite> attach '/var/lib/humaxtv/channel.db~' as old;
sqlite> insert into TBL_SVC select * from old.TBL_SVC where uslcn = 108;
sqlite> select svcidx from TBL_SVC where uslcn = 108;
127
... 108 is back ...
sqlite>
humax# sync
humax# reboot
UPDATE TBL_SVC SET svcIdx=ROWID,hSvc=((tsIdx<<16)|(ROWID&65535))
sqlite> select count(*) from TBL_SVC where rowid != svcIdx;
0
In "Edit Pragmas" I found an "Auto Vacuum" setting at "None" and tried switching it to "Full", but it didn't do anything and when I looked at the setting again it had gone back to "None".It won't unless you issue a "vacuum" command.
It just gives "cannot VACUUM from within a transaction: vacuum" when I tried it in the Execute SQL tab. This is why I hate these things as you're never quite sure what's going to happen or what commands it's issuing. Obviously it appears to be wrapping what you enter into a transaction, which is not always what you want.I would like it if somebody who knows something about this stuff would install DB Browser for SQLite and have a look around at the facilities - they might spot something helpful that to me is just noise.
I agree, the unvacuumed file seems to work perfectly well, it's just part of the exploration of what can be done outside the box.Not that I know what you are trying to achieve by shrinking the file anyway?