Re: [sqlite] GROUP BY and ICU collation

2019-02-08 Thread Michael Herger
Hi Keith, thanks for your response (which partly goes beyond my understanding, but I'm learning :-)). But you are not using the same "expression" for selecting, sorting, and grouping. That is, you need to specify: SELECT expression, count(distinct id) FROM artists GROUP BY expressi

[sqlite] Committing changes to the database without releasing a writer lock

2019-02-08 Thread Theodore Dubois
I'd like to essentially commit changes to disk in the middle of the transaction, resulting in a transaction that is atomic with respect to other database connections but is two atomic transactions with respect to the filesystem. When I first found the locking_mode pragma, my understanding was t

Re: [sqlite] Problem to delete all data with a LIKE

2019-02-08 Thread Ludovic Gasc Lemaire
Hi Simon, Thanks for your tip, this command has found problems, see below. It should explain this strange behavior with DELETE ? I have found this procedure on the Web to fix the file: https://www.2doapp.com/kb/article.php?id=743&oid=38 Is it the correct way or another way exists ? Kind regards

Re: [sqlite] GROUP BY and ICU collation

2019-02-08 Thread David Raymond
Remember that fancy collations don't just look at 1 character at a time, they look at the whole thing, and can do surprising stuff based on that. In this case the order of preference for the collation looks like "when it's part of a larger word, then treating 'S' and 'Š' the same is more importa

Re: [sqlite] GROUP BY and ICU collation

2019-02-08 Thread Richard Damon
On 2/8/19 9:11 AM, David Raymond wrote: > Remember that fancy collations don't just look at 1 character at a time, they > look at the whole thing, and can do surprising stuff based on that. In this > case the order of preference for the collation looks like "when it's part of > a larger word, th

[sqlite] Vacuum into

2019-02-08 Thread David Raymond
So to make sure I'm understanding it ok, with the new vacuum into command, if I'm the only user of a file, then the sequence... open file1 vacuum into file2 close file1 delete file1 rename file2 to file1 ...is going to be potentially more than twice as fast as the old... open file1 vacuum ...a

Re: [sqlite] Committing changes to the database without releasing a writer lock

2019-02-08 Thread Simon Slavin
On 7 Feb 2019, at 9:53pm, Theodore Dubois wrote: > I'd like to essentially commit changes to disk in the middle of the > transaction, resulting in a transaction that is atomic with respect to other > database connections but is two atomic transactions with respect to the > filesystem. Would S

Re: [sqlite] Vacuum into

2019-02-08 Thread Richard Hipp
On 2/8/19, David Raymond wrote: > So to make sure I'm understanding it ok, with the new vacuum into command, > if I'm the only user of a file, then the sequence... > > open file1 > vacuum into file2 > close file1 > delete file1 > rename file2 to file1 > > ...is going to be potentially more than tw

Re: [sqlite] GROUP BY and ICU collation

2019-02-08 Thread Keith Medcalf
Must be whatever the ICU collating sequence does. It apparently sorts into an order you like, but does not sort the characters as being "the same". Unless they are "the same" they will not be in the same group. The unifuzz "unaccented" collation does sort the two characters as "the same" (no

Re: [sqlite] Vacuum into

2019-02-08 Thread Chris Locke
If you renamed file1.db to file1.bak, opened file1.bak, vacuum into file1.db, close file1.bak, you have a backup pre-vacuum (just in case...) and 'streamlines' the process some-what. Obviously, you'd have to rename the file back again if the vacuum failed (out of disk space, etc) Just a thought,,,

Re: [sqlite] Problem to delete all data with a LIKE

2019-02-08 Thread Simon Slavin
On 8 Feb 2019, at 1:49pm, Ludovic Gasc Lemaire wrote: > Thanks for your tip, this command has found problems, see below. > It should explain this strange behavior with DELETE ? Yes. The corruption you have found in your database can explain lots of weird and non-standard behaviour. In fact, e

Re: [sqlite] GROUP BY and ICU collation

2019-02-08 Thread Michael Herger
Remember that fancy collations don't just look at 1 character at a time, they look at the whole thing, and can do surprising stuff based on that. In this case the order of preference for the collation looks like "when it's part of a larger word, then treating 'S' and 'Š' the same is more import

[sqlite] Was there an announcement of 3.27?

2019-02-08 Thread Jens Alfke
I see 3.27 was released yesterday (and quickly followed up with 3.27.1.) I only discovered this because the post asking about VACUUM INTO gave me a clue that this might be a newly-released feature, so I went to the release-history page. We’ve been awaiting this release because it fixes a bad que

Re: [sqlite] Was there an announcement of 3.27?

2019-02-08 Thread Christian Schmitz
> Am 08.02.2019 um 18:43 schrieb Jens Alfke : > > I see 3.27 was released yesterday (and quickly followed up with 3.27.1.) I The announcement was on the sqlite-annou...@mailinglists.sqlite.org list. 3.27 was ready to go, a bug was found, so 3.27.1 was announced today, so everyone could skip

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-08 Thread Ben Asher
Thanks all! Super helpful. Ben On Wed, Feb 6, 2019 at 11:55 AM Ben Asher wrote: > Hi there! We're having a debate at my company about date storage in > SQLite. SQLite has builtin support for ISO8601 in its date functions, so > some folks have started storing dates as ISO8601 SQLite-compatible d

Re: [sqlite] Was there an announcement of 3.27?

2019-02-08 Thread David Raymond
As mentioned the release announcements is a separate mailing list, so people can get those without being deluged by stuff from this list. Pasting the announcement here. -Original Message- From: sqlite-announce [mailto:sqlite-announce-boun...@sqlite.org] On Behalf Of Richard Hipp Sent:

Re: [sqlite] Was there an announcement of 3.27?

2019-02-08 Thread Simon Slavin
On 8 Feb 2019, at 6:25pm, David Raymond wrote: > https://sqlite.org/releaselog/3_27_1.html "Add options "--expanded", "--normalized", "--plain", "--profile", "--row", "--stmt", and "--close" to the ".trace" command." Is there a discussion of these anywhere ? Simon. __

Re: [sqlite] Vacuum into

2019-02-08 Thread David Raymond
Non-scientific "let's just try it" results Short version: Original file had been vacuumed already as the last thing that had happened to it. File size: 20,467,359,744 sqlite> vacuum into 'vac_into.sqlite'; Run Time: real 589.577 user 222.941029 sys 57.829571 sqlite> vacuum; Run Time: real 1429.

Re: [sqlite] Was there an announcement of 3.27?

2019-02-08 Thread Richard Hipp
On 2/8/19, Simon Slavin wrote: > On 8 Feb 2019, at 6:25pm, David Raymond wrote: > >> https://sqlite.org/releaselog/3_27_1.html > > "Add options "--expanded", "--normalized", "--plain", "--profile", "--row", > "--stmt", and "--close" to the ".trace" command." > > Is there a discussion of these an

Re: [sqlite] Vacuum into

2019-02-08 Thread Richard Hipp
On 2/8/19, David Raymond wrote: > Non-scientific "let's just try it" results > > Short version: > Original file had been vacuumed already as the last thing that had happened > to it. > File size: 20,467,359,744 > > sqlite> vacuum into 'vac_into.sqlite'; > Run Time: real 589.577 user 222.941029 sys

Re: [sqlite] Vacuum into

2019-02-08 Thread David Raymond
But now, here's the weird part ladies and gentlemen. I started this on one drive, vacuum into completed, but then I had to do real work on that drive, so copied the file over to an unused drive to do the previously reported timing without it being biased by other things going on. But I saw some

[sqlite] (no subject)

2019-02-08 Thread Jayram Singh
___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Was there an announcement of 3.27?

2019-02-08 Thread Dominique Pellé
David Raymond wrote: > SQLite version 3.27.1 is now available on the SQLite website: > > https://sqlite.org/ > https://sqlite.org/download.html > https://sqlite.org/releaselog/3_27_1.html Release notes https://sqlite.org/releaselog/3_27_1.html say: === BEGIN QUOTE === Added the remove_diac

Re: [sqlite] Vacuum into

2019-02-08 Thread David Raymond
Hmm. So after a normal vacuum, "Non-sequential pages" is basically 1 for everything, tables and indexes alike. On a read-only "vacuum into" it's anywhere from 22% to 99.5%, usually being more towards 99%. Numbers for "Table X without any indicies" seem identical apart from the Non-sequential pa