[sqlite] SQLite big tables create index in parallel

2016-03-19 Thread Domingo Alvarez Duarte
Hello Simon ! Here it's: (database size 5GB, run twice) squilu time-create-index.nut Total number of records??? 11290493 Time spent counting the table items??? 0.070402 Time spent reading the table items??? 20.6519 Time spent indexing the table items??? 43.1917 Time difference indexing -

[sqlite] Anyone familiar with SQLite source code: Index creation question

2016-03-19 Thread Simon Slavin
On 19 Mar 2016, at 10:04pm, Richard Hipp wrote: > (B). It's much much faster that way. Thanks. Makes sense. Simon.

[sqlite] SQLite big tables create index in parallel

2016-03-19 Thread Domingo Alvarez Duarte
Hello Simon ! Thanks for reply ! When you say [The majority of the time in 'CREATE INDEX' is spent writing the index, not reading the table.] where the data to spend time creating the index come from ? Cheers ! > Sat Mar 19 2016 08:13:13 PM CET from "Simon Slavin" > Subject: Re:

[sqlite] Anyone familiar with SQLite source code: Index creation question

2016-03-19 Thread Simon Slavin
Suppose I have the following table: CREATE TABLE t (a, b); with a few million rows of random data in. Suppose there are no indexes on the table. I create the following index on the table: CREATE INDEX t_b ON t (b); There are two ways to make the index. (A) Go through the table

[sqlite] SQLite big tables create index in parallel

2016-03-19 Thread Simon Slavin
On 19 Mar 2016, at 8:54pm, Domingo Alvarez Duarte wrote: > When you say [The majority of the time in 'CREATE INDEX' is spent writing the > index, not reading the table.] where the data to spend time creating the > index come from ? Use the SQLite shell tool. Use the '.timer ON' command. Write

[sqlite] COLLATE NU800_NOCASE as a loadable extension?

2016-03-19 Thread Tom Holden
Aleksey Tulinov writes: . > > Unfortunately i'm not familiar with SQLite Expert, however > > >2.6 Message : no such collation sequence:_RMNOCASE > > Collation provided by nunicode SQLite extension is called NU800_NOCASE > (or NU800 for case-sensitive collation), that

[sqlite] windows binary error

2016-03-19 Thread Amr Saber
I can't find sqlite3.exe in the windows binaries form the downloads page !!

[sqlite] Article about pointer abuse in SQLite

2016-03-19 Thread Scott Robison
On Mar 19, 2016 1:19 PM, "James K. Lowden" wrote: > > On Sat, 19 Mar 2016 02:04:35 -0600 > Scott Robison wrote: > > > As he says, there's not real choice between fast and > > > correct > > > > Except that testing can verify something is correct for a given > > environment. > > That's actually

[sqlite] SQLite big tables create index in parallel

2016-03-19 Thread Simon Slavin
On 19 Mar 2016, at 11:03am, Domingo Alvarez Duarte wrote: > Would be nice if sqlite provide a way to create indexes in parallel, I mean > when working with big tables and creating several indexes the time spent > scanning the whole database/table is considerable and it's the same for each >

[sqlite] Reserved column names

2016-03-19 Thread Simon Slavin
On 19 Mar 2016, at 10:30am, Paul Sanderson wrote: > Is there a list of reserved column names > > I have seen the list or keywords at the link below > > http://www.sqlite.org/lang_keywords.html > > but for instance create table (abort int) will work fine. It may work fine for that statement

[sqlite] Sqlite do not use index collate nocase

2016-03-19 Thread Yuriy M. Kaminskiy
On 03/18/16 00:24 , Keith Medcalf wrote: > The column data is case sensitive and the comparison is case > sensitive. There is no case sensitive index. > > You either need (a) to make the column collate nocase (in which case > any index on the column is also in the same nocase collation and thus

[sqlite] Anyone familiar with SQLite source code: Index creation question

2016-03-19 Thread Richard Hipp
On 3/19/16, Simon Slavin wrote: > > I create the following index on the table: > CREATE INDEX t_b ON t (b); > There are two ways to make the index. > > (A) Go through the table in row order adding each row to the index, > modifying the tree as you go. > > (B) Use the same strategy as you

[sqlite] Reserved column names

2016-03-19 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 19/03/16 03:30, Paul Sanderson wrote: > I know that keywords can be quoted but I am interested in just > those that can be used unquoted (even if not advisable) Out of curiousity, why? My rule of thumb is to always quote (using square brackets)

[sqlite] Article about pointer abuse in SQLite

2016-03-19 Thread Richard Hipp
On 3/19/16, James K. Lowden wrote: > > Second, you can't test the future. If the correctness of the code is > subject to change by the compiler's interpretation of the language, how > is the programmer to prevent it? > Indeed. Every bit of the code examined by Prof. Regehr was well-defined

[sqlite] Article about pointer abuse in SQLite

2016-03-19 Thread James K. Lowden
On Sat, 19 Mar 2016 02:04:35 -0600 Scott Robison wrote: > As he says, there's not real choice between fast and > > correct > > Except that testing can verify something is correct for a given > environment. That's actually not true, on a couple of levels. "[T]esting can be used

[sqlite] Reserved column names

2016-03-19 Thread Richard Hipp
On 3/19/16, Paul Sanderson wrote: > Is there a list of reserved column names > > I have seen the list or keywords at the link below > > http://www.sqlite.org/lang_keywords.html > > but for instance create table (abort int) will work fine. > There is no list. The "official" position is that

[sqlite] COLLATE NU800_NOCASE as a loadable extension?

2016-03-19 Thread Aleksey Tulinov
On 03/17/2016 07:29 PM, Torleif Haug?deg?rd wrote: Torleif, > Now the resultat was this one; > > Exception: > -- >2.1 Date : Thu, 17 Mar 2016 18:27:00 +0100 >2.2 Address : 00AA83F5 >

[sqlite] error messages from SQLite

2016-03-19 Thread Paul Sanderson
Thanks Tim I am not concerned with errors from function calls - just errors with SQL queries at the command line etc. Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit

[sqlite] SQLite big tables create index in parallel

2016-03-19 Thread Domingo Alvarez Duarte
Hello ! Would be nice if sqlite provide a way to create indexes in parallel, I mean when working with big tables and creating several indexes the time spent scanning the whole database/table is considerable and it's the same for each "create index", we could have a big time/cpu/disk seek saving

[sqlite] error messages from SQLite

2016-03-19 Thread Tim Streater
On 19 Mar 2016 at 10:26, Paul Sanderson wrote: > When executing a sql query I often find I have made a typo or been a > bit dull and I'll get an error message back along the lines of > > Error: near "text": syntax error > > Is there a way of expanding on this, for instance adding more of the >

[sqlite] Reserved column names

2016-03-19 Thread Paul Sanderson
Is there a list of reserved column names I have seen the list or keywords at the link below http://www.sqlite.org/lang_keywords.html but for instance create table (abort int) will work fine. I know that keywords can be quoted but I am interested in just those that can be used unquoted (even if

[sqlite] error messages from SQLite

2016-03-19 Thread Paul Sanderson
When executing a sql query I often find I have made a typo or been a bit dull and I'll get an error message back along the lines of Error: near "text": syntax error Is there a way of expanding on this, for instance adding more of the following text or a character offset. The last time this

[sqlite] Article about pointer abuse in SQLite

2016-03-19 Thread Scott Robison
On Mar 18, 2016 11:12 PM, "James K. Lowden" wrote: > > On Fri, 18 Mar 2016 16:33:56 -0600 > Scott Robison wrote: > > > I'd rather have code that might use some "undefined behavior" and > > generates the right answer than code that always conformed to defined > > behavior yet was logically

[sqlite] Article about pointer abuse in SQLite

2016-03-19 Thread James K. Lowden
On Fri, 18 Mar 2016 16:33:56 -0600 Scott Robison wrote: > I'd rather have code that might use some "undefined behavior" and > generates the right answer than code that always conformed to defined > behavior yet was logically flawed. Code that falls under undefined behavior *is* logically

[sqlite] Article about pointer abuse in SQLite

2016-03-19 Thread Simon Slavin
On 18 Mar 2016, at 10:33pm, Scott Robison wrote: > I'd rather have code that might use some "undefined behavior" and generates > the right answer than code that always conformed to defined behavior yet > was logically flawed. Mind you, I don't often have to worry about my code > being compiled