Re: [sqlite] Performance issue in different versions

2018-02-01 Thread Nick
I realized that the amount of memory used for the page cache is different. And I found that is the root cause. Sorry for my careless mistake. Thank you. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users mailing list

Re: [sqlite] Performance issue in different versions

2018-02-01 Thread Nick
Yup, absolutely you are right. I just ran a new test using the same upper bound on the amount of memory used for the page cache, then I found a reasonable result. Thank you, Dan. I did notice the cache_size change before but you made me realize it. Thanks a lot. -- Sent from:

Re: [sqlite] Tee to a table

2018-02-01 Thread Peter Da Silva
Switch -glob and switch -regexp are also handy for this kind of code. On 2/1/18, 3:07 PM, "sqlite-users on behalf of Peter Da Silva" wrote: You can do something like this, for one record per file:

Re: [sqlite] Tee to a table

2018-02-01 Thread Peter Da Silva
You can do something like this, for one record per file: Sqlite3 db file.sqlite while {[gets stdin line] > 0} { lappend content $line } set content [join $content "\n"; # or otherwise manipulate the text you got back. db eval {INSERT INTO whatever (index, content) VALUES ($index, $content);}

Re: [sqlite] Tee to a table

2018-02-01 Thread Cecil Westerhof
2018-02-01 21:49 GMT+01:00 Peter Da Silva : > It's pretty easy in Tcl > > Sqlite3 db file.sqlite > while {[gets stdin line] > 0} { > parse_line_into index content; # or whatever you do to extract content > from the line > db eval {INSERT INTO whatever

Re: [sqlite] Tee to a table

2018-02-01 Thread Simon Slavin
On 1 Feb 2018, at 8:55pm, Cecil Westerhof wrote: >> Can you use scripting commands to include it in a file which scripts the >> SQLite command-line tool ? > > ​I am not sure what you mean. You can ignore my suggestion. You are using Tcl and it's easier in Tcl. Sorry,

Re: [sqlite] Tee to a table

2018-02-01 Thread Cecil Westerhof
2018-02-01 21:42 GMT+01:00 Simon Slavin : > On 1 Feb 2018, at 8:25pm, Cecil Westerhof wrote: > > > At the moment I have a script where I send the output of a ffmpeg command > > to the terminal and a file. Is it possible to send the output to a SQLite

Re: [sqlite] Tee to a table

2018-02-01 Thread Peter Da Silva
It's pretty easy in Tcl Sqlite3 db file.sqlite while {[gets stdin line] > 0} { parse_line_into index content; # or whatever you do to extract content from the line db eval {INSERT INTO whatever (index, content) VALUES ($index, $content);} } db close On 2/1/18, 2:25 PM, "sqlite-users on

Re: [sqlite] Tee to a table

2018-02-01 Thread Simon Slavin
On 1 Feb 2018, at 8:25pm, Cecil Westerhof wrote: > At the moment I have a script where I send the output of a ffmpeg command > to the terminal and a file. Is it possible to send the output to a SQLite > table. I like to use tcl for this. Is the output a string of text ?

[sqlite] Tee to a table

2018-02-01 Thread Cecil Westerhof
At the moment I have a script where I send the output of a ffmpeg command to the terminal and a file. Is it possible to send the output to a SQLite table. I like to use tcl for this. -- Cecil Westerhof ___ sqlite-users mailing list

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread Chris Green
R Smith wrote: > The reason day-names are not part of the standard set of date-time > functions is that they are not standard and certainly not international. > > For you it is "Mon, Tue, Wed, Thu, Fri, Sat Sun"... > > But for me it might be: > > "Lun, Mar, Mer, Jeu,

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread R Smith
The reason day-names are not part of the standard set of date-time functions is that they are not standard and certainly not international. For you it is "Mon, Tue, Wed, Thu, Fri, Sat Sun"... But for me it might be: "Lun, Mar, Mer, Jeu, Ven, Sam, Dim" or sometimes simply "Lu, Ma, Me, Je, Ve,

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread Chris Green
x wrote: > Don’t think you’ll get it any less ugly than > > substr('SunMonTueWedThuFriSat',strftime('%w',Date)*3+1,3); > Yes, thanks, that's where I had got to! :-) -- Chris Green · ___ sqlite-users mailing list

Re: [sqlite] [EXTERNAL] Re: Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread Hick Gunter
Waiting for someone to post a CTE solution along the lines of WITH weekday(dayno,dayname) AS (SELECT (0,'Sun) ) .. SELECT dayname FROM weekday WHERE dayno = strftime(...). -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag

Re: [sqlite] Performance issue in different versions

2018-02-01 Thread Dan Kennedy
On 02/01/2018 04:05 PM, Nick wrote: I update sqlite in my Android mobile phone from 3.9.2 to 3.16.2. And I find the default page_size in 3.9.2 is 1024 while in 3.16.2 is 4096 (changed since 3.12.0). I think SQLITE_DEFAULT_PAGE_SIZE has great effect on the performance so I use speedtest1.c to

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread x
Don’t think you’ll get it any less ugly than substr('SunMonTueWedThuFriSat',strftime('%w',Date)*3+1,3); without defining your own functions. From: Chris Green Sent: 01 February 2018 13:13 To:

Re: [sqlite] Performance issue in different versions

2018-02-01 Thread Richard Hipp
On 2/1/18, Nick wrote: > I update sqlite in my Android mobile phone from 3.9.2 to 3.16.2. > > There are many test cases in speedtest1.c and case 270 is a DELETE case > which is the most time-consuming one. > There is a result. (different version + different

Re: [sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread John McKown
On Thu, Feb 1, 2018 at 6:55 AM, Chris Green wrote: > I want to get Sun, Mon, Tue, Wed etc. from a date, what's the easiest > way of doing this in a sqlite select? > > I guess I can do something (horrible?) with the numeric day of week > and substr() but is there not an easier way?

[sqlite] Easiest way to get day of week as a string (not a number)?

2018-02-01 Thread Chris Green
I want to get Sun, Mon, Tue, Wed etc. from a date, what's the easiest way of doing this in a sqlite select? I guess I can do something (horrible?) with the numeric day of week and substr() but is there not an easier way? -- Chris Green · ___

Re: [sqlite] Performance issue in different versions

2018-02-01 Thread Nick
Um, I am a OS application developer and we just upgraded the source code on our developing engine. I am sure I used the same compile-options. SQLITE_SECURE_DELETE is not set. -- Sent from: http://sqlite.1065341.n5.nabble.com/ ___ sqlite-users

Re: [sqlite] Performance issue in different versions

2018-02-01 Thread Clemens Ladisch
Nick wrote: > I update sqlite in my Android mobile phone from 3.9.2 to 3.16.2. How? Your own copy, or the system one? Did you use the same configuration? Especially SQLITE_SECURE_DELETE? Regards, Clemens ___ sqlite-users mailing list

Re: [sqlite] missing subquery flattening

2018-02-01 Thread E.Pasma
Mark Brand wrote: On 26/01/18 19:35, Clemens Ladisch wrote: Mark Brand wrote: Shouldn't we expect subquery flattening to happen in V2 below? -- no flattening CREATE VIEW V2 AS SELECT * FROM X LEFT JOIN ( SELECT * FROM X LEFT JOIN Y ON Y.a = X.a ) Z ON Z.a =

[sqlite] Performance issue in different versions

2018-02-01 Thread Nick
I update sqlite in my Android mobile phone from 3.9.2 to 3.16.2. And I find the default page_size in 3.9.2 is 1024 while in 3.16.2 is 4096 (changed since 3.12.0). I think SQLITE_DEFAULT_PAGE_SIZE has great effect on the performance so I use speedtest1.c to test it. There are many test cases in