Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-03 Thread dd
Did you see any improvement if application runs with high priority(nice)? (CPU and I/O) On Thu, Apr 3, 2014 at 12:56 AM, Kevin Xu wrote: > The app seems to use between 60-80% CPU while it is running (from Activity > Monitor) while disk use (using sudo iotop -P on OSX) seem

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-03 Thread Clemens Ladisch
Kevin Xu wrote: > The SQLite page_size is on its default setting (1024b), while I have > not dug out the details on my specific SSD, a cursory Google search > reveals SSDs report a 512b sector size for compatibility reasons while > internally implementing a different native sector size (which is >

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-03 Thread Dominique Devienne
On Thu, Apr 3, 2014 at 4:10 AM, Kevin Xu wrote: > I have put up my insertion code here: http://pastebin.com/yjRW2mh3 As mentioned by Stephan Beal, use SQLITE_STATIC instead of SQLITE_TRANSIENT for your text/blob binding. As long as the memory buffer you are binding stays

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-03 Thread Simon Slavin
On 3 Apr 2014, at 3:29am, Kevin Xu wrote: > I have not discovered how to find internal memory throughput usage in OSX, > and I agree that something is not allowing the system from maxing out the CPU > or I/O. A single application can max a single core of a single CPU if

[sqlite] Join of two virtual tables returns incorrect result set in 3.8.4.1

2014-04-03 Thread Hinrichsen, John
I am posting my C repro for the virtual table join issue inline, below: /* * This repro is intended to demonstrate a possible bug when joining * two virtual table instances together: only a subset of the expected * rows is returned by sqlite. As far as we can tell, it only happens * when the

[sqlite] Where did the release announcements go?

2014-04-03 Thread Patrick Herbst
I depend on the sqlite-announce list to get updates on new releases. But it seems they haven't been posting there for the last couple releases. Why not? The archive shows the last announcement came for the 3.8.3.1 release. ___ sqlite-users mailing

Re: [sqlite] Join of two virtual tables returns incorrect result set in 3.8.4.1

2014-04-03 Thread Richard Hipp
Trouble ticket for this problem here: http://www.sqlite.org/src/info/98825a79ce145686392d8074032ae54863aa21a3 On Thu, Apr 3, 2014 at 9:24 AM, Hinrichsen, John wrote: > I am posting my C repro for the virtual table join issue inline, below: > > /* > * This repro is

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-03 Thread Shane Harrelson
Neither of these are your problem, but I noticed the following in your posted code: PRAGMA auto_vacuum=NONE; has no affect after your tables are created. You should move this setting earlier in your code. http://www.sqlite.org/pragma.html#pragma_auto_vacuum PRAGMA count_changes=OFF is

Re: [sqlite] Where did the release announcements go?

2014-04-03 Thread Klaas V
Patrick asked  "Where did the release announcements go? This is the right place to go. Here you find announcements of new versions, planned updates and bug-fixes even before they arrive at  Recent SQLite News Recent SQLite News Small. Fast. Reliable. Choose any three. About Sitemap

[sqlite] Problem using ICU

2014-04-03 Thread Stadin, Benjamin
I¹m having problems to return results from a FTS4 table using ICU. I¹m doing the usual routine to load an ICU collation: 1) Directly after opening the DB: SELECT icu_load_collation('de_DE', 'LOCALIZED'); 2) Creating some table CREATE VIRTUAL TABLE ¹sometable' USING fts4 (tokenize='icu'

Re: [sqlite] Version 3.8.4.3

2014-04-03 Thread Andreas Stieger
On 03/04/14 19:10, D. Richard Hipp wrote: > SQLite version 3.8.4.3 is now available for download on the SQLite website: The autoconf version is not linked and missing. http://www.sqlite.org/download.html http://www.sqlite.org/2014/sqlite-autoconf-3080403.tar.gz Is this intentional? Andreas

Re: [sqlite] Version 3.8.4.3

2014-04-03 Thread Richard Hipp
On Thu, Apr 3, 2014 at 2:25 PM, Andreas Stieger wrote: > On 03/04/14 19:10, D. Richard Hipp wrote: > > SQLite version 3.8.4.3 is now available for download on the SQLite > website: > > The autoconf version is not linked and missing. > http://www.sqlite.org/download.html >

[sqlite] Improve documentation of collation callback?

2014-04-03 Thread James Berry
Documentation of the parameters to the collation callback could be improved: (http://www.sqlite.org/c3ref/create_collation.html) (1) A function prototype for the callback with named parameters is not given, so one has to guess what the parameters are used for. (2) It’s also not

Re: [sqlite] INSERT several rows

2014-04-03 Thread Igor Tandetnik
On 4/3/2014 4:23 PM, Roman Fleysher wrote: Is ability to insert multiple rows in one go a feature of a newer versions: INSERT INTO myTable (designation) VALUES ('LoResFA_only'), ('HiResFA_only'); Support for this syntax was introduced relatively recently. I don't remember which version

Re: [sqlite] INSERT several rows

2014-04-03 Thread Richard Hipp
On Thu, Apr 3, 2014 at 4:48 PM, Igor Tandetnik wrote: > On 4/3/2014 4:23 PM, Roman Fleysher wrote: > >> Is ability to insert multiple rows in one go a feature of a newer >> versions: >> >> INSERT INTO myTable (designation) VALUES ('LoResFA_only'), >> ('HiResFA_only'); >> > >

Re: [sqlite] INSERT several rows

2014-04-03 Thread Roman Fleysher
OK, thank you, Igor! I presume there is no way to get documentation for older versions -- no point in keeping. Roman From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Igor Tandetnik [i...@tandetnik.org] Sent:

Re: [sqlite] INSERT several rows

2014-04-03 Thread Richard Hipp
On Thu, Apr 3, 2014 at 4:52 PM, Roman Fleysher < roman.fleys...@einstein.yu.edu> wrote: > OK, thank you, Igor! I presume there is no way to get documentation for > older versions -- no point in keeping. > The source code to the historical documentation is online:

Re: [sqlite] INSERT several rows

2014-04-03 Thread David King
> Wouldn't it be easier just to upgrade to SQLite 3.8.4.3? Why do you feel > like you need to stick with 3.7.2 which is 3.5 years old (what is that in > internet years? 100?) I can't speak for Roman, but the biggest thing that keeps me from using newer sqlite features is that I write desktop

Re: [sqlite] INSERT several rows

2014-04-03 Thread Roman Fleysher
Thank you for the links, Richard! I am part of the Einstein Aging Study. The software (in internet years) should be as old as the people we study (in calendar years). From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of

Re: [sqlite] Join of two virtual tables returns incorrect result set in 3.8.4.1

2014-04-03 Thread Hinrichsen, John
That was a fast turn-around. Thank you for addressing this issue so quickly! -- This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you should not disseminate, distribute, alter or copy this e-mail. Please notify

Re: [sqlite] INSERT several rows

2014-04-03 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/04/14 14:37, David King wrote: > ... because of the author's opinions of the standard Python ways to > require packages As said author, the problem is that pip etc authors chose to make it impossible to provide arguments to parts of the install

Re: [sqlite] Where did the release announcements go?

2014-04-03 Thread Patrick Herbst
> > This is the right place to go. Here you find announcements of new > versions, planned updates and bug-fixes even before they arrive at > > Recent SQLite News No, I think they're all supposed to show up in sqlite-announce; not sqlite-users. 3.8.4.3 was announced in sqlite-announce. Very

[sqlite] isBad table bad design?

2014-04-03 Thread Roman Fleysher
Dear SQLiters, Could some help if this is bad design or my lack of knowledge of SQL: I have a table that keeps track of bad metrics from exams: badMetric(examID, metric, reason) I want to filter-out bad ones and keep only good ones from the user request: request(examID, metric). I thought:

Re: [sqlite] isBad table bad design?

2014-04-03 Thread Richard Hipp
On Thu, Apr 3, 2014 at 6:32 PM, Roman Fleysher < roman.fleys...@einstein.yu.edu> wrote: > Dear SQLiters, > > Could some help if this is bad design or my lack of knowledge of SQL: > > I have a table that keeps track of bad metrics from exams: > > badMetric(examID, metric, reason) > > I want to

Re: [sqlite] Feature request - Tcl variables as "value-list"s

2014-04-03 Thread Andy Goth
Thread necromancy! Back in 2007 I expressed a desire to efficiently insert a *list* of values all at once, where the entire list is contained within a single Tcl variable. The notation would be to use the variable name, prefixed with $ or :, in place of the value list, intentionally omitting

Re: [sqlite] isBad table bad design?

2014-04-03 Thread Roman Fleysher
Life is beautiful ! when you know what you are doing... Thank you, Richard. From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Richard Hipp [d...@sqlite.org] Sent: Thursday, April 03, 2014 6:39 PM To: General Discussion

[sqlite] if possible point another table

2014-04-03 Thread YAN HONG YE
I have a table named aa like this: id pid namenotetablename 1 0 s12 bbc k1 2 1 sss vac k2 another table named k1: id pid namenote 11 1 f2 aaa 12 1 fs bbc another table named k2: id

Re: [sqlite] if possible point another table

2014-04-03 Thread Andy Goth
On 4/3/2014 8:46 PM, YAN HONG YE wrote: I have a table named aa like this: id pid namenotetablename 1 0 s12 bbc k1 2 1 sss vac k2 another table named k1: id pid namenote 11 1 f2 aaa 12 1 fs

Re: [sqlite] if possible point another table

2014-04-03 Thread Andy Goth
On 4/3/2014 10:10 PM, Keith Medcalf wrote: select * from k1 union select * from k2; My understanding of the question was, how to select from tables whose names are somehow computed or extracted from another table -- Andy Goth | ___

Re: [sqlite] if possible point another table

2014-04-03 Thread mm.w
Hello, yep; else; it would require an "eval" or the support to sql scripting, as none of this exists, it has to be done at the program level; in a regular two queries run, nothing fancy or extraordinary. Best. On Thu, Apr 3, 2014 at 9:13 PM, Andy Goth wrote: > On

Re: [sqlite] if possible point another table

2014-04-03 Thread mm.w
refactoring the model using views might be an option too. On Thu, Apr 3, 2014 at 9:50 PM, mm.w <0xcafef...@gmail.com> wrote: > Hello, > > yep; else; it would require an "eval" or the support to sql scripting, as > none of this exists, it has to be done at the program level; in a regular > two

Re: [sqlite] if possible point another table

2014-04-03 Thread Darren Duncan
On 2014-04-03, 7:19 PM, Andy Goth wrote: I don't believe this can be done in pure SQL since table names are not values. That doesn't mean it can't be done, though you will have to put some of the logic in your program itself. I expect that in the future this limitation will no longer exist.