Re: [sqlite] Database is locked

2018-03-02 Thread Frank Millman
On 2/28/18 3:18 PM, Frank Millman wrote: > > On 2/28/18 2:53 PM, Richard Damon wrote: > > > > > On 2/28/18 6:59 AM, Frank Millman wrote: > > > Hi all > > > > > > I am using Python 3.6.0 and sqlite3 3.20.1. I am getting the message > > > ‘database is locked’ which, from reading the docs, I

Re: [sqlite] Question about Practicality of Embedding SQLite on Cortex-M4 Processor

2018-03-02 Thread Doug Currie
On Fri, Mar 2, 2018 at 2:46 PM, Obrien, John J wrote: > [...] > > To summarize, my question is regarding what direction I should ask the > hardware vendor to take. Does it make sense for them to spend time > optimizing the SAM4S for SQLite or should we consider another

Re: [sqlite] Missing "pushDownWhereTerms" optimisation on recursive CTE

2018-03-02 Thread Dan Kennedy
On 03/01/2018 05:37 PM, Adrián Medraño Calvo wrote: Dear SQLite, The following SQL script shows a query selecting data from a recursive CTE and filtering it. I expected the optimizer to apply the filter to the recursive CTE directly, and indeed the documentation of pushDownWhereTerms

Re: [sqlite] Question about Practicality of Embedding SQLite on Cortex-M4 Processor

2018-03-02 Thread Bob Friesenhahn
If you really only have 160KB of RAM (vs 160MB), then that would be prohibitive. Linux and SQLite are not going to be able to run with 160KB of RAM. Otherwise, it sounds like a fine idea. Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/

[sqlite] Question about Practicality of Embedding SQLite on Cortex-M4 Processor

2018-03-02 Thread Obrien, John J
Hello, My team is working on a project that involves transmitting sensor data from a data logger module to a mobile application via Bluetooth. I am interested in finding a relatively fast, reliable way to store the data that was collected by the data logger. Since we aren't guaranteed to

Re: [sqlite] Missing "pushDownWhereTerms" optimisation on recursive CTE

2018-03-02 Thread E.Pasma
Adrián Medraño Calvo wrote: The following SQL script shows a query selecting data from a recursive CTE and filtering it. I expected the optimizer to apply the filter to the recursive CTE directly, and indeed the documentation of pushDownWhereTerms (src/select.c:3833) indicates this

Re: [sqlite] pragma table_info(tbl)

2018-03-02 Thread David Raymond
cid is the column number, to get the primary key look in the pk field and the primary key will have numbers 1, 2 etc. for each field in the primary key. SQLite version 3.22.0 2018-01-22 18:45:57 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to

Re: [sqlite] Missing "pushDownWhereTerms" optimisation on recursive CTE

2018-03-02 Thread petern
Some observations. It seems the WHERE pushdown optimization you cited only applies to subqueries with existing WHERE clause. In your example without WHERE, the SELECT specifies the whole table as the left hand side of the UNION. Scanning the whole table is likely more efficient than using an

Re: [sqlite] Question regarding 3.23.0 (pending) and TRUE/FALSE

2018-03-02 Thread Richard Hipp
On 3/2/18, Olivier Mascia wrote: > is TRUE an alias to 1? Yes. Just to be clear, if it is possible to resolve TRUE to the name of a column in a table, then it will refer to that column. TRUE only becomes an alias for 1 if there is no other way to resolve the name. This is

Re: [sqlite] pragma table_info(tbl)

2018-03-02 Thread Keith Medcalf
-- Catalog Views using sqlite_master for SysObjects (Object Names) -- and the various pragma_(ObjectName) tables to retrieve schema data -- all TEXT columns in views have "collate nocase" attached to the output -- columns to ensure that where conditions on retrievals are not case sensitive --

[sqlite] pragma table_info(tbl)

2018-03-02 Thread mike otwell
I have a table named person that contains 13 columns. pragma table_info(person) returns 13 rows of cid. I assume this is the primary key... do I need to add something to get the column name along with cid? -- No trees were killed in the sending of this message. However, a large number of

Re: [sqlite] Question regarding 3.23.0 (pending) and TRUE/FALSE

2018-03-02 Thread Olivier Mascia
> Le 2 mars 2018 à 13:19, Richard Hipp a écrit : > >> Will insert into T values(FALSE) actually store integer 0 no matter column >> affinity or will it follow affinity? > > No. FALSE is merely an alias for 0. Affinity still applies. If the > column is of type TEXT, then it

[sqlite] System.Data.SQLite version 1.0.108.0 released

2018-03-02 Thread Joe Mistachkin
System.Data.SQLite version 1.0.108.0 (with SQLite 3.22.0) is now available on the System.Data.SQLite website: https://system.data.sqlite.org/ Further information about this release can be seen at: https://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki Please post on the

Re: [sqlite] Question regarding 3.23.0 (pending) and TRUE/FALSE

2018-03-02 Thread Richard Hipp
On 3/2/18, J Decker wrote: > On Fri, Mar 2, 2018 at 4:19 AM, Richard Hipp wrote: > >> On 3/2/18, Olivier Mascia wrote: >> > >> > What values will be considered FALSE, and hence will TRUE be NOT FALSE >> > or >> > equality to some other

Re: [sqlite] Question regarding 3.23.0 (pending) and TRUE/FALSE

2018-03-02 Thread J Decker
On Fri, Mar 2, 2018 at 4:19 AM, Richard Hipp wrote: > On 3/2/18, Olivier Mascia wrote: > > > > What values will be considered FALSE, and hence will TRUE be NOT FALSE or > > equality to some other specific value? > > I have a note to provide additional

Re: [sqlite] Question regarding 3.23.0 (pending) and TRUE/FALSE

2018-03-02 Thread Richard Hipp
On 3/2/18, Olivier Mascia wrote: > > What values will be considered FALSE, and hence will TRUE be NOT FALSE or > equality to some other specific value? I have a note to provide additional documentation on this before the release. In short, a value is FALSE is, when converted

Re: [sqlite] Question regarding 3.23.0 (pending) and TRUE/FALSE

2018-03-02 Thread Clemens Ladisch
Olivier Mascia wrote: > What values will be considered FALSE 0, and they keyword "FALSE". FALSE is an alias for the integer 0. > and hence will TRUE be NOT FALSE or equality to some other specific value? What exactly do you mean with "be" and "equality"? The SQL = and IS operators work as

Re: [sqlite] Missing "pushDownWhereTerms" optimisation on recursive CTE

2018-03-02 Thread Clemens Ladisch
Adrián Medraño Calvo wrote: > The following SQL script shows a query selecting data from a recursive > CTE and filtering it. I expected the optimizer to apply the filter to > the recursive CTE directly, and indeed the documentation of > pushDownWhereTerms (src/select.c:3833) indicates this

Re: [sqlite] High performance and concurrency

2018-03-02 Thread Rowan Worth
On 2 March 2018 at 03:43, Shevek wrote: > We use HikariCP, so a connection is in use by one thread at a time with > JMM-safe handoff, and they all share the mmap region. > Shevek also wrote: > What I think is happening is that either a pthread mutex or a database lock is

Re: [sqlite] High performance and concurrency

2018-03-02 Thread Clemens Ladisch
Shevek wrote: > Why would I have a transaction of non-zero size on a read-only connection? What do you mean with "size"? A read-only transaction still puts a shared lock on the database file. A read-only transaction will not change the DB file, but SQLite has lots of internal data structures in