Re: [sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Kyle
As indicated by "Random Coder", the problem was that I was missing the required dependencies. Thank you. On Tue, Mar 5, 2019 at 8:03 PM Thomas Kurz wrote: > Are both of the same architecture, either 32bit or 64bit? > > - Original Message - > From: Kyle > To:

Re: [sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Thomas Kurz
Are both of the same architecture, either 32bit or 64bit? - Original Message - From: Kyle To: sqlite-users@mailinglists.sqlite.org Sent: Tuesday, March 5, 2019, 23:30:35 Subject: [sqlite] Problems loading extensions on Windows 10 I am having problems loading sqlite3 extensions on

Re: [sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Random Coder
On Tue, Mar 5, 2019 at 2:30 PM Kyle wrote: > I have downloaded both sqlite3 and mod_spatialite.dll (the extension) and > copied them to C:\Windows\System32. > > When I run > SELECT load_extension('mod_spatialite') > sqlite returns "Error: the specified module could not be found" Helpfully,

[sqlite] Problems loading extensions on Windows 10

2019-03-05 Thread Kyle
I am having problems loading sqlite3 extensions on Windows 10. I have downloaded both sqlite3 and mod_spatialite.dll (the extension) and copied them to C:\Windows\System32. When I run SELECT load_extension('mod_spatialite') sqlite returns "Error: the specified module could not be found" I

Re: [sqlite] Equiv stmts, different explain plans

2019-03-05 Thread Keith Medcalf
On Tuesday, 5 March, 2019 12:53, James K. Lowden wrote: >On Mon, 04 Mar 2019 20:20:08 -0700> "Keith Medcalf" >wrote: >> In the first query the subselect that creates the list is >> independent. >> In the second query the subselect that creates the list is >> correlated. >Yes, and if it can

Re: [sqlite] Segmentation fault running a query

2019-03-05 Thread David Raymond
And if it does still crash, please provide the database schema to help with debugging. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin Sent: Tuesday, March 05, 2019 3:14 PM To: SQLite mailing list Subject: Re:

Re: [sqlite] Segmentation fault running a query

2019-03-05 Thread Simon Slavin
On 5 Mar 2019, at 8:06pm, Peter Hardman wrote: > If i run the following query from Python 3.7 using the sqlite3 DBAPI adapter > or from sqlitebrowser I get a segmentation fault. Please find the SQLite command-line tool on your computer. If you don't already have one you can download one for

[sqlite] Segmentation fault running a query

2019-03-05 Thread Peter Hardman
If i run the following query from Python 3.7 using the sqlite3 DBAPI adapter or from sqlitebrowser I get a segmentation fault. The query runs error free on PostgreSQL 9.6 The query fails if the 'in' list has more than two entries. Any ideas? I could create a test database but it will take a

Re: [sqlite] Equiv stmts, different explain plans

2019-03-05 Thread James K. Lowden
On Mon, 04 Mar 2019 20:20:08 -0700 "Keith Medcalf" wrote: > In the first query the subselect that creates the list is independent. > In the second query the subselect that creates the list is correlated. Yes, and if it can be shown that the two queries are logically equivalent under relational

Re: [sqlite] [EXTERNAL] Equiv stmts, different explain plans

2019-03-05 Thread James K. Lowden
On Tue, 5 Mar 2019 08:13:32 + Hick Gunter wrote: > The second statement uses a *correlated* subquery as the RHS of an IN > expression. The QP needs to actually run this query for every record > of t1 that matches the condition t1.c == 1. I'm not sure what you mean be "needs", above. If

Re: [sqlite] Equiv stmts, different explain plans

2019-03-05 Thread Keith Medcalf
On Tuesday, 5 March, 2019 04:09, Simon Slavin wrote: >On 5 Mar 2019, at 2:06am, kk wrote: select * from t1 where c=1 and d in (select d from t2 where c=1); select * from t1 where c=1 and d in (select d from t2 where t2.c=t1.c); >> DRH, many thanks for your reply, I

Re: [sqlite] Equiv stmts, different explain plans

2019-03-05 Thread Simon Slavin
On 5 Mar 2019, at 2:06am, kk wrote: >>> select * from t1 >>>where c=1 and d in (select d from t2 where c=1); >>> select * from t1 >>>where c=1 and d in (select d from t2 where t2.c=t1.c); > DRH, many thanks for your reply, I was expecting same output because I > believe stmts to be

Re: [sqlite] Handling ROLLBACK

2019-03-05 Thread Simon Slavin
On 5 Mar 2019, at 3:22am, Rowan Worth wrote: > Wait what? If I've understood correctly you're describing a situation where > statements outlive their transaction context? The documentation on transactions covers this possibility. This includes continuing to do _step() for one statement while

Re: [sqlite] Equiv stmts, different explain plans

2019-03-05 Thread R Smith
On 2019/03/05 4:06 AM, kk wrote: On 05/03/2019 01:33, Richard Hipp wrote: create table t1(c,d); create table t2(c,d); explain select * from t1     where c=1 and d in (select d from t2 where c=1); explain select * from t1     where c=1 and d in (select d from t2 where t2.c=t1.c); DRH, many

Re: [sqlite] [EXTERNAL] Equiv stmts, different explain plans

2019-03-05 Thread Hick Gunter
Both statements generate the same result set, but they are neither equivalent nor equally fast. The first statement uses a *constant* subquery as the RHS of an IN expression. The QP is free to materialize this query (i.e. run it once and keep the results in an "ephemeral" table with an index