Re: [sqlite] Something broke between version 3.15 and 3.19.3

2017-06-10 Thread Richard Hipp
On 6/11/17, Balaji Ramanathan wrote: > Hi, > > I maintain a personal database on sqlite. It is quite small, with > about 30 tables, and an equal number of views. One of these views is an > inner join of the contents of about 15 of these views, producing a summary > view of my data. The view

[sqlite] Something broke between version 3.15 and 3.19.3

2017-06-10 Thread Balaji Ramanathan
Hi, I maintain a personal database on sqlite. It is quite small, with about 30 tables, and an equal number of views. One of these views is an inner join of the contents of about 15 of these views, producing a summary view of my data. The views combined in this summary view contain about 320

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Richard Damon
On 6/10/17 6:31 PM, R Smith wrote: On 2017/06/10 8:24 PM, Richard Damon wrote: On 6/10/17 8:13 AM, R Smith wrote: The typical usage, storing full text UUID minus braces in an ASCII/UTF-8 sequence will result in a hair over 2.3 times[1] the storage of INTs. Not really that bad I think. I

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread R Smith
On 2017/06/10 8:24 PM, Richard Damon wrote: On 6/10/17 8:13 AM, R Smith wrote: The typical usage, storing full text UUID minus braces in an ASCII/UTF-8 sequence will result in a hair over 2.3 times[1] the storage of INTs. Not really that bad I think. If the field was declared as char[38]

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Daniel Anderson
I drink to that! 2017-06-10 14:26 GMT-04:00 Jens Alfke : > > > On Jun 10, 2017, at 6:58 AM, Daniel Anderson wrote: > > > > the article was integers (4 bytes) vs guid as a primary key, which as > > string takes 36 bytes. so he was right in saying that string guid/uuid > take > > 9 time the space

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Jens Alfke
> On Jun 10, 2017, at 11:24 AM, Richard Damon wrote: > > If the field was declared as char[38], and UNICODE collation, many systems > will allocate 4 bytes per character to allow for any possible character Maybe, but it’s a bad design! It’s a huge amount of bloat for most text that would be s

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Jens Alfke
> On Jun 10, 2017, at 6:58 AM, Daniel Anderson wrote: > > the article was integers (4 bytes) vs guid as a primary key, which as > string takes 36 bytes. so he was right in saying that string guid/uuid take > 9 time the space of simple integers. Ah, that explains where he got 9x. I still think i

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Richard Damon
On 6/10/17 8:13 AM, R Smith wrote: In that worst case scenario (all of the UUID plus dashes and braces), the full storage requirement for a UUID would look like this: {--Axxx-Bxxx-} which totals 38 characters of ASCII (or UTF-8) text space which totals 38 bytes. Let's

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Simon Slavin
There’s no reason for a human to want to sort by GUID. They’re arbitrary symbols and don’t have an order. Anyone who says "Show me our spare parts in GUID order." needs to rethink why they’re doing what they’re doing. However, SQLite does searching by sorting. Binary chop is still the best wa

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread J Decker
On Sat, Jun 10, 2017 at 5:13 AM, R Smith wrote: > > On 2017/06/10 6:27 AM, Jens Alfke wrote: > >> On Jun 9, 2017, at 3:05 PM, Simon Slavin wrote: >>> >>> Tangential to SQLite, but there’s little on the list at the moment so >>> perhaps some of you might like this. >>>

[sqlite] kvtest.c compilation warning on Windows MinGW 6.3.0

2017-06-10 Thread Keith Medcalf
kvtest.c:129:0: warning: "R_OK" redefined # define R_OK 2 In file included from C:/Apps/MinGW64/x86_64-w64-mingw32/include/sys/stat.h:14:0, from kvtest.c:118: C:/Apps/MinGW64/x86_64-w64-mingw32/include/io.h:185:0: note: this is the location of the previous definition #define R

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread Daniel Anderson
the article was integers (4 bytes) vs guid as a primary key, which as string takes 36 bytes. so he was right in saying that string guid/uuid take 9 time the space of simple integers. in general the article was quite good and allowed people to ponder about their choices/beliefs. he said be: *caref

Re: [sqlite] Article: UUID or GUID as Primary Keys? Be Careful!

2017-06-10 Thread R Smith
On 2017/06/10 6:27 AM, Jens Alfke wrote: On Jun 9, 2017, at 3:05 PM, Simon Slavin wrote: Tangential to SQLite, but there’s little on the list at the moment so perhaps some of you might like this.