PixivUtil2 icon indicating copy to clipboard operation
PixivUtil2 copied to clipboard

Replace root does not seems to work on huge sqlite db

Open whinette opened this issue 11 years ago • 5 comments

I moved my collection to another path this week end. When I try to replace the root path, a sqlite-journal is created and the cli exit it states (return to db menu), but the journal does not disapear and no change is done to the db (verified with sqlitebrowser). I waited around one hour and nothing seems to happen.

The db is ~174MB.

whinette avatar Oct 13 '14 17:10 whinette

After 1h30 I had some changes, it is just extremely slow. Edit: no it did not work after all. :(

whinette avatar Oct 13 '14 17:10 whinette

fyi, it took 15879ms with this query:

UPDATE pixiv_master_image SET save_name = replace(save_name, 'I:\Pixiv', 'P:\Pixiv') WHERE save_name LIKE 'I:\Pixiv%'

And your code does exactly the same thing, so ... I dunno.

whinette avatar Oct 13 '14 17:10 whinette

maybe because of python sqlite lib? I cannot do anything if this true...

Nandaka avatar Oct 14 '14 00:10 Nandaka

@whinette While testing update root, I found that the database is not committed until until the you exit the Manage Database menu. To be safe, try exiting the whole program normally after performing the update ( you will be prompted by menu again once it completes). This worked perfectly fine for me and I have >196,000 (43.1 MiB) entries.

If you are displaying your database in a GUI remember that you will have to refresh, because the records have changed in a transaction after the one initially used to display those results.

awiebe avatar Jan 05 '18 03:01 awiebe

I haven't seen any changes to my DB when using it. image the output of this text is instant, so it doesn't seem like anything really happened either.

rwchunk avatar May 08 '20 03:05 rwchunk