Re: [sqlite] REFERENCES from TEMPORARY table to main database table?

2016-07-26 Thread James K. Lowden
On Sat, 23 Jul 2016 01:06:23 + "Smith, Randall" wrote: > Using "REFERENCES main.Symbols" appears to be a syntax error. I think you got caught by a special case. Any kind of DRI would be hard to enforce across database boundaries. In general, if we have two

Re: [sqlite] Using SQLite without SQL.

2016-07-26 Thread Simon Slavin
On 26 Jul 2016, at 10:41pm, John Found wrote: > Well, not as a "demonstration", but for regular use. > I am writing all my software in assembly language, > so such aspiration is some kind of natural for me. :) > > Read my answer to DRH for more details on my motives.

Re: [sqlite] Using SQLite without SQL.

2016-07-26 Thread John Found
On Tue, 26 Jul 2016 21:52:26 +0100 Simon Slavin wrote: > > On 26 Jul 2016, at 9:29pm, John Found wrote: > > > Is it possible to use SQLite, making queries directly in the internal > > virtual machine language, instead of SQL? > > > > Or in another

Re: [sqlite] Using SQLite without SQL.

2016-07-26 Thread John Found
On Tue, 26 Jul 2016 16:40:07 -0400 Richard Hipp wrote: > On 7/26/16, John Found wrote: > > Is it possible to use SQLite, making queries directly in the internal > > virtual machine language, instead of SQL? > > No. Why do you want to do this. The SQL

Re: [sqlite] Using SQLite without SQL.

2016-07-26 Thread Simon Slavin
On 26 Jul 2016, at 9:29pm, John Found wrote: > Is it possible to use SQLite, making queries directly in the internal virtual > machine language, instead of SQL? > > Or in another variant, compile the queries in design time, manually optimize > them (if needed) and then

Re: [sqlite] Using SQLite without SQL.

2016-07-26 Thread Richard Hipp
On 7/26/16, John Found wrote: > Is it possible to use SQLite, making queries directly in the internal > virtual machine language, instead of SQL? No. Why do you want to do this. The SQL language is the most compelling feature of SQLite. Why abandon it? > > Or in

[sqlite] Using SQLite without SQL.

2016-07-26 Thread John Found
Is it possible to use SQLite, making queries directly in the internal virtual machine language, instead of SQL? Or in another variant, compile the queries in design time, manually optimize them (if needed) and then store and call in the program in compiled form? --

Re: [sqlite] sqlite 3.13.0 does not use indexes as 3.8.11.1 does

2016-07-26 Thread Richard Hipp
On 7/26/16, Richard Hipp wrote: > Consider: > > SELECT * FROM t1 WHERE b=99 AND c<>22 ORDER BY a LIMIT 1; > Or, how about this one: SELECT * FROM t1 WHERE appfunc(b)=99 AND c<>22 ORDER BY a LIMIT 1; In this case, SQLite has the option of doing a table look-up in order

Re: [sqlite] sqlite 3.13.0 does not use indexes as 3.8.11.1 does

2016-07-26 Thread Richard Hipp
On 7/26/16, Alessandro Fardin wrote: > > The Query planner with the same SELECT statement on same table with the > same indexes does not use index at all, but parse the entire table. > Of course this causes a dramatically slow down of the application. > When you

Re: [sqlite] Bug Related To Queries With Quotes Numbers

2016-07-26 Thread Richard Hipp
On 7/26/16, Tim Gustafson wrote: > This schema was created by the Webform module, which is a > contributed module to the Drupal project. I will give your feedback > to the developers of that module, but they're not using SQLite > exclusively and there might be a reason why they

Re: [sqlite] sqlite 3.13.0 does not use indexes as 3.8.11.1 does

2016-07-26 Thread Quan Yong Zhai
SQLite version 3.14.0 2016-07-26 04:49:43 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> create table t(x,y,z); sqlite> create index i1 on t(x,y); sqlite> explain query plan select * from t where y=100

Re: [sqlite] Bug Related To Queries With Quotes Numbers

2016-07-26 Thread Tim Gustafson
> If the column is INTEGER, the default value shouldn't be a string. > This is especially true of the INTEGER PRIMARY KEY column. I didn't make this schema, so I can take no credit (or blame) for its design. This schema was created by the Webform module, which is a contributed module to the

Re: [sqlite] sqlite 3.13.0 does not use indexes as 3.8.11.1 does

2016-07-26 Thread Quan Yong Zhai
Query plan changed, It's a bug 发件人: Alessandro Fardin 发送时间: ‎2016/‎7/‎26 16:37 收件人: sqlite-users@mailinglists.sqlite.org 主题: [sqlite] sqlite 3.13.0 does not use indexes as

Re: [sqlite] sqlite3_scrub_backup() -> database disk image is malformed

2016-07-26 Thread Dan Kennedy
On 07/26/2016 04:49 PM, Ralf Junker wrote: I use the following C code to test sqlite3_scrub_backup() [1]. Unfortunately, it results in a malformed database disk image. Also, I am surprised that VACUUMing the original database produces a smaller file than sqlite3_scrub_backup(). Should they

Re: [sqlite] SQLite 4

2016-07-26 Thread Simon Slavin
On 26 Jul 2016, at 8:02am, sanhua.zh wrote: > Is SQLite 4 in a developing status? You are correct. Please do not use SQLite 4 for serious work. At the moment it is just a way for the developers to experiment with ideas for a future version of SQLite. Everything

Re: [sqlite] sqlite 3.13.0 does not use indexes as 3.8.11.1 does

2016-07-26 Thread Eduardo Morras
On Tue, 26 Jul 2016 10:37:12 +0200 Alessandro Fardin wrote: > After updating from sqlite 3.8.11.1 to sqlite 3.13.0. > > The Query planner with the same SELECT statement on same table with > the same indexes does not use index at all, but parse the entire >

[sqlite] sqlite3_scrub_backup() -> database disk image is malformed

2016-07-26 Thread Ralf Junker
I use the following C code to test sqlite3_scrub_backup() [1]. Unfortunately, it results in a malformed database disk image. Also, I am surprised that VACUUMing the original database produces a smaller file than sqlite3_scrub_backup(). Should they not be the same size? Is this a problem with

Re: [sqlite] sqlite 3.13.0 does not use indexes as 3.8.11.1 does

2016-07-26 Thread Luca Ferrari
On Tue, Jul 26, 2016 at 10:37 AM, Alessandro Fardin wrote: > As temporary work around we have have added to the query the INDEXED BY > energy_d_dateTimeIdx statement. > > In sqlite 3.8.11.1 the select was issued by using the > energy_d_dateTimeIdx index Any

[sqlite] sqlite 3.13.0 does not use indexes as 3.8.11.1 does

2016-07-26 Thread Alessandro Fardin
After updating from sqlite 3.8.11.1 to sqlite 3.13.0. The Query planner with the same SELECT statement on same table with the same indexes does not use index at all, but parse the entire table. Of course this causes a dramatically slow down of the application. As temporary work around we have

[sqlite] SQLite 4

2016-07-26 Thread sanhua.zh
Hello, I found this pagewhich is about SQLite 4. But there are no download page in it and the most recently update is 2015.08.15. Is SQLite 4 in a developing status? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org