Re: [sqlite] Why the parallel read of DB is faster with separate connections per thread?

2016-06-17 Thread Keith Medcalf
See also https://www.sqlite.org/threadsafe.html > -Original Message- > From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users- > boun...@mailinglists.sqlite.org] On Behalf Of Yuri > Sent: Friday, 17 June, 2016 14:02 > To: SQLite mailing list > Subject: [sqlite] Why the

Re: [sqlite] Why the parallel read of DB is faster with separate connections per thread?

2016-06-17 Thread Keith Medcalf
> I have a fairly large DB that I need to only read (not write) as fast as > possible. I open DB with flags > SQLITE_OPEN_READONLY|SQLITE_OPEN_PRIVATECACHE and then run select > queries in 8 threads. > > When each thread opens its own connection, DB is read in 8 wallclock > seconds using 23 user

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Chris Locke
Thanks James. Points taken on board. :-) Chris On Fri, Jun 17, 2016 at 5:24 PM, James K. Lowden wrote: > On Fri, 17 Jun 2016 07:37:16 +0100 > Chris Locke wrote: > > > I fail to see what any of this has to do with sqlite. I thought this >

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Chris Locke
As this is a mailing list, I've not been aware of past history. I thought (albeit wrongly) that an SQLite group was about the product sqlite. Someone posted the other day about a car analogy, so this is like posting to the Ford Engine Forums, askign what air freshner to put in the car. I don't

[sqlite] it's just a bombshell!

2016-06-17 Thread goclimbonit
Hi, Have you ever seen something like that? It's a bombshell you have to see! Look at it here Sincerely, goclimbo...@yahoo.it ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] Why the parallel read of DB is faster with separate connections per thread?

2016-06-17 Thread Yuri
I have a fairly large DB that I need to only read (not write) as fast as possible. I open DB with flags SQLITE_OPEN_READONLY|SQLITE_OPEN_PRIVATECACHE and then run select queries in 8 threads. When each thread opens its own connection, DB is read in 8 wallclock seconds using 23 user seconds.

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
2016-06-17 18:26 GMT+02:00 Igor Tandetnik : > > select * from t1 where col1 = ?1+?2 and col2=?1-?2; > > What should be the expected output of your hypothetical generic way for a > statement like this? > > You seem to assume a one-to-one correspondence between columns and >

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
2016-06-17 18:24 GMT+02:00 James K. Lowden : > > You are encoding type information in the name. If you move the type > information into the data, SQLite can manage the unit dimension. You > could use a CHECK constraint to require that speed was in m/s, or a > trigger

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Igor Tandetnik
On 6/17/2016 8:21 AM, Rapin Patrick wrote: Find a generic way to retrieve column names and table name (and then column types with above pragma) in a arbitrary single SQL statement for all placeholder values. Examples: "INSERT INTO t1(col1, col2) VALUES(2, ?); » => (t1, col2) "UPDATE t2 SET

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread James K. Lowden
On Fri, 17 Jun 2016 07:37:16 +0100 Chris Locke wrote: > I fail to see what any of this has to do with sqlite. I thought this > was a mailing list for sqlite? Seeing queries (no pun intended) on > sql statements is very subjective, especially with the limited data >

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread James K. Lowden
On Thu, 16 Jun 2016 20:53:25 + "Drago, William @ CSG - NARDA-MITEQ" wrote: > CREATE TABLE Apples ( > ID INTEGER PRIMARY KEY, > Color TEXT COLLATE NOCASE, --Could be Red, Green, or Yellow check Color in ( 'Red', 'Green', 'Yellow' ), -- FTFY > Height REAL,

Re: [sqlite] Trouble coding conditional UNIQUE

2016-06-17 Thread James K. Lowden
On Thu, 16 Jun 2016 23:23:33 +0200 Dominique Devienne wrote: > > > On Behalf Of James K. Lowden > > > > > > create view vParts as > > > select 1 as Matched, * from Parts > > > UNION > > > select 0, * from UnmatchedParts > > > > Why UNION instead of

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread James K. Lowden
On Fri, 17 Jun 2016 10:56:32 +0200 Rapin Patrick wrote: > And my C++ wrapper then knows that this column is a speed expressed > in meters per second. So when making a SELECT on t1 table, the > wrapper will output number objects with unit dimension of Speed > expressed in

Re: [sqlite] Lemon bug in shiftreduce action for error symbol

2016-06-17 Thread Richard Hipp
On 6/6/16, Vincent Zweije wrote: > > When the shiftreduce action is used in an error context, > such as: > >X -> alpha error. > > the adjustment is not made. This causes error handling to fail. > Is this problem fixed by

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread R Smith
On 2016/06/17 3:35 PM, John McKown wrote: On Fri, Jun 17, 2016 at 1:37 AM, Chris Locke wrote: I fail to see what any of this has to do with sqlite. I thought this was a mailing list for sqlite? Seeing queries (no pun intended) on sql statements is very subjective,

[sqlite] Lemon bug in shiftreduce action for error symbol

2016-06-17 Thread Vincent Zweije
[resent without pgp signature since i've not seen it come back on the list or had any reaction so far] The shiftreduce action is a shift action followed by a reduce action. It is executed in two parts: a shift part, shifting to an anonymous state. In this state, the state number is actually an

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Drago, William @ CSG - NARDA-MITEQ
> -Original Message- > From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users- > boun...@mailinglists.sqlite.org] On Behalf Of John McKown > Sent: Friday, June 17, 2016 9:35 AM > To: SQLite mailing list > Subject: Re: [sqlite] Correct, best, or generally accepted database

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread John McKown
On Fri, Jun 17, 2016 at 1:37 AM, Chris Locke wrote: > I fail to see what any of this has to do with sqlite. I thought this was a > mailing list for sqlite? Seeing queries (no pun intended) on sql > statements is very subjective, especially with the limited data

Re: [sqlite] sqlite database is locked when query SQLITE_MASTER table

2016-06-17 Thread Simon Slavin
Are you programming in a programming language ? If so, which language are you using and which library are you using to execute SQLite commands ? If you are scripting instead please tell us which scripting language you're using. If you are using multi-threading or multi-processing, please tell

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Drago, William @ CSG - NARDA-MITEQ
> -Original Message- > From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users- > boun...@mailinglists.sqlite.org] On Behalf Of Chris Locke > Sent: Friday, June 17, 2016 2:37 AM > To: SQLite mailing list > Subject: Re: [sqlite] Correct, best, or generally accepted database

Re: [sqlite] Possibly missing feature in json1 extension

2016-06-17 Thread Richard Hipp
New json_quote() function added on a branch (https://www.sqlite.org/src/info/2c3714aebf5e40e3). If there is no pushback, and if this fixes David's problem, then this will get merged to trunk and appear in the next release. On 6/16/16, David Empson wrote: > I'm working

Re: [sqlite] rand_s and Windows 2000

2016-06-17 Thread Richard Hipp
On 6/17/16, Alex Alabuzhev wrote: > Hi guys, > > SQlite 3.12 and newer uses rand_s in winRandomness() implementation. > > rand_s depends on > RtlGenRandom >

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
> Le 17 juin 2016 à 13:35, Hick Gunter a écrit : > > Does > > .pragma table_info(); > > not solve your problem? > I indeed need PRAGMA table_info(), to get type names from column names. Let my rephrase my question: Find a generic way to retrieve column names and table

[sqlite] rand_s and Windows 2000

2016-06-17 Thread Alex Alabuzhev
Hi guys, SQlite 3.12 and newer uses rand_s in winRandomness() implementation. rand_s depends on RtlGenRandom API (aka Advapi32.dll::SystemFunction036), which is only available

[sqlite] sqlite database is locked when query SQLITE_MASTER table

2016-06-17 Thread Bhavesh Patel
I have the huge size of the database file (approx 5.5GB). I have two processes. 1.The first process: It executes master table query. (Ex. "SELECT "type", "tbl_name" FROM "SQLite_MASTER"). It creates the new table using the dump of the existing table and database file size has been increased

Re: [sqlite] Correct, best, or generally accepted database structure for groups of things

2016-06-17 Thread Chris Locke
I fail to see what any of this has to do with sqlite. I thought this was a mailing list for sqlite? Seeing queries (no pun intended) on sql statements is very subjective, especially with the limited data provided by the original poster. Everyone will give helpful advice, but it won't stop there,

Re: [sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Hick Gunter
Does .pragma table_info(); not solve your problem? -Ursprüngliche Nachricht- Von: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Rapin Patrick Gesendet: Freitag, 17. Juni 2016 10:57 An:

[sqlite] sqlite3_column_origin_name for INSERT and UPDATE

2016-06-17 Thread Rapin Patrick
Hello, I am using function sqlite3_column_origin_name and friends in my SQLite3 C++ wrapper class to get table and column names in SELECT statements. I would like to have the same feature for INSERT and UPDATE statements: that is, find the table name and column names when writing to the