Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Keith Medcalf
On Thursday, 20 February, 2020 22:06, Andy KU7T wrote: >I admit I do not fully understand all the arguments. I am running on >Windows. Are you saying the PRNG on Windows is not good enough to use >randomblob(16) in Sqlite? All I need is a reasonable assurance that is >are unique... Yes, it is

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Andy KU7T
I admit I do not fully understand all the arguments. I am running on Windows. Are you saying the PRNG on Windows is not good enough to use randomblob(16) in Sqlite? All I need is a reasonable assurance that is are unique... Andy Sent from my T-Mobile 4G LTE Device Get Outlook for

[sqlite] Performance Issue on Large Table

2020-02-20 Thread Chip Beaulieu
I have a table with 4.5 million records with full text indexing. Reads are very fast, but deleting / inserting / updating takes on average about 50 seconds per record. I often do batches of 30,000 deletes / inserts at a time. The last batch took 10 hours to complete. Here are the details:

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Rowan Worth
On Fri, 21 Feb 2020 at 03:59, Jens Alfke wrote: > > On Feb 20, 2020, at 10:48 AM, Richard Hipp wrote: > > > > That assumption is not correct for SQLite, which does you a > > cryptographically strong PRNG. And the SQLite PRNG is seeded from > > /dev/random on unix. > > Not quite; I'm looking at

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Jens Alfke
> On Feb 20, 2020, at 10:48 AM, Richard Hipp wrote: > > That assumption is not correct for SQLite, which does you a > cryptographically strong PRNG. And the SQLite PRNG is seeded from > /dev/random on unix. Not quite; I'm looking at the function unixRandomness() in SQLite 3.28. It's seeded

[sqlite] .dump

2020-02-20 Thread Thomas Kurz
I noticed that the .dump command in the CLI doesn't contain the "user_version" and "application_id" fields. I don't know whether this is intentional, but would you consider including these values in the output of .dump? ___ sqlite-users mailing list

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Keith Medcalf
On Thursday, 20 February, 2020 11:48, Richard Hipp wrote: >The author of that article, "Raymond", assumes that the random number >generator in the SQL database engine is not cryptographically strong. Actaully, what "Raymond" is on about is the fact that the original definition of a GUID,

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Richard Hipp
On 2/20/20, Keith Medcalf wrote: > > randomblob(16) does not generate a valid UUID (it does not set the version > and variant flags in the resulting 16-bytes of random data). If you need a UUID in the "standard format", rather than just an ID that its universally unique, you can use the uuid.c

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Richard Hipp
On 2/20/20, Andy KU7T wrote: > Hi, > I added a randomblob(16) to each record of a Sqlite table via a trigger with > the goal of global uniqueness. Is that the correct approach or would it be > better to pass Guid from .Net? I am using System.Data.Sqlite. The following > article got me questioning

Re: [sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Keith Medcalf
randomblob(16) generates 16 random bytes. randomblob(16) does not generate a valid UUID (it does not set the version and variant flags in the resulting 16-bytes of random data). If you set the version to 4 and the variant to 1 then randomblob(16) does produce valid version 4 uuids with

[sqlite] Is randomblob(16) a good guid generation across multiple computers?

2020-02-20 Thread Andy KU7T
Hi, I added a randomblob(16) to each record of a Sqlite table via a trigger with the goal of global uniqueness. Is that the correct approach or would it be better to pass Guid from .Net? I am using System.Data.Sqlite. The following article got me questioning the usage of randomblob:

Re: [sqlite] DRH interview on why/how SQLite succeeded

2020-02-20 Thread sky5walk
In the ever expanding bloat of tooling, DRH is my hero. On Wed, Feb 19, 2020 at 2:56 PM Stephen Chrzanowski wrote: > I just finished listening to this. Really cool. > > Thanks for ALL of your hard work SQLite team. I appreciate it sincerely. > > > On Wed, Feb 19, 2020 at 12:39 PM Simon Slavin

Re: [sqlite] [EXTERNAL] rtrim and round functions unexpected result

2020-02-20 Thread Jose Isaias Cabrera
Ah, so rtrim(X,Y) removes all characters in the Y slot; NOT the string Y. Apologies. I thought that it was the string that it removed. Ok, replace it is, then. From: sqlite-users on behalf of Hick Gunter Sent: Thursday, February 20, 2020 11:09 AM To:

Re: [sqlite] [EXTERNAL] rtrim and round functions unexpected result

2020-02-20 Thread Hick Gunter
Round(1299.6) returns the floating point number 1300.0, passing 1300.0 to the rtrim function converts it tot he string '1300.0' removing all '.' and '0' characters from '1300.0' yields 13 This is no suprise -Ursprüngliche Nachricht- Von: sqlite-users

[sqlite] rtrim and round functions unexpected result

2020-02-20 Thread Jose Isaias Cabrera
Greetings. Please take a look at the following: sqlite> select rtrim(round(1235.6)); 1236.0 This is expected. sqlite> select rtrim(round(1235.6),'.0'); 1236 Also expected. sqlite> select rtrim(round(1299.6),'.0'); 13 is not expected. I was hoping for 1300. Also, just rtrim, sqlite> select

Re: [sqlite] question about INTEGER PRIMARY KEY AUTOINCREMENT

2020-02-20 Thread Keith Medcalf
On Wednesday, 19 February, 2020 21:24, ethan he wrote: >There is a SQLITE DATABASE has “MeslocallD”(INTEGER PRIMARY KEY >AUTOINCREMENT), >Is that possible to delete the data but still keep the MeslocallD >consistence? Assuming that by "consistence" you mean the high-water mark for inserted

Re: [sqlite] [EXTERNAL] question about INTEGER PRIMARY KEY AUTOINCREMENT

2020-02-20 Thread Hick Gunter
The next value for an INTEGER PRIMARY KEY AUTOINCREMENT does not depend on the current contents of the table, only its history. While ROWIDs are monotnically increasing, there may be gaps in the sequence, caused by rows that failed to insert due to constraint violations. However, ROWIDs that

[sqlite] question about INTEGER PRIMARY KEY AUTOINCREMENT

2020-02-20 Thread ethan he
Hi, There is a SQLITE DATABASE has “MeslocallD”(INTEGER PRIMARY KEY AUTOINCREMENT), Is that possible to delete the data but still keep the MeslocallD consistence? Thanks for your help ___ sqlite-users mailing list