I already rewrote it with the info you gave in the other thread. :-) It runs in around one second. And the slice length is easily modified.
2016-08-11 11:38 GMT+02:00 R Smith <rsm...@rsweb.co.za>: > STAT_INFO(count, onePercent, likeString) AS ( -- Please don't use > reserved words like "count" as column I changed that and then I saw I did not need it anymore. > SELECT Slice > , Percentage > FROM STAT_SLICES > WHERE Percentage IS NOT NULL -- This line is superfluous, you can > remove it (unless you meant zero - NULL is not Zero) > Nope, it is necessary. Because some of the SELECT did not have a result and then you get NULL. But the code is a lot cleaner now, so I do not need it anymore. > One other annoyance. I do this is the SQLite database browser. Every time I > >> execute this, my database is locked and I have to revert changes. What is >> happening here. >> By the way, this also happens when I execute: >> pragma table_info(vmstat) >> >> > I think it executes it in a transaction - so won't unlock until the > transaction is either committed or rolled back. > Yes that is what happens. But (as far as I know) the database is not changed. So why is it happening? And the rollback needs to be done in the GUI. :-( Just a SELECT does not have this problem, but I also get it with: pragma table_info(vmstat) Well it is a problem of the DB browser I suppose. -- Cecil Westerhof _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users