Re: [sqlite] Sqlite RTree nearest neighbour

2014-08-21 Thread Richard Hipp
On Thu, Aug 21, 2014 at 8:54 PM, Peter Aronson wrote: > 1. You would need to access SQLite's R-Tree "shadow" tables > (xx_node, xx_parent, xx_rowid) directly in to perform the traversals > required by all of the algorithms -- I don't know if this is officially >

Re: [sqlite] Sqlite RTree nearest neighbour

2014-08-21 Thread Peter Aronson
According to R-Trees: Theory and Applications by Yannis Manolopoulos, Alexandros Nanopoulos, Apostolos N. Papadopoulos and Yannis Theodoridis, there are a number of algorithms for efficiently determining the nearest neighbor(s) using an R-Tree (an internet search on the two terms will pull up

Re: [sqlite] Mixing journal modes from different threads

2014-08-21 Thread Teg
Hello George, I use different journal modes within the same application to different database files. My files don't all have the same protection level. Some files I turn it off completely for better speed. Others, I can't afford to lose the data. C Thursday, August 21, 2014, 3:17:05 PM,

Re: [sqlite] Sqlite RTree nearest neighbour

2014-08-21 Thread Carlos Ferreira
I am not an expert in Sqlite R-tree, but it seems that if you want to solve a nearest neighbor you need not only to search the objects in the leaf containing the object you testing, but also some adjacent leaves around. Another option would be to search for objects inside a centered box or

Re: [sqlite] Sqlite RTree nearest neighbour

2014-08-21 Thread Simon Slavin
On 21 Aug 2014, at 10:32pm, skywind mailing lists wrote: > does anybody have any experience with implementing a nearest neighbor search > using SQLite's RTree functionality? Is a nearest neighbor search possible? How much have you read ? Are you familiar with

[sqlite] Sqlite RTree nearest neighbour

2014-08-21 Thread skywind mailing lists
Hello, does anybody have any experience with implementing a nearest neighbor search using SQLite's RTree functionality? Is a nearest neighbor search possible? Regards, Hartwig ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Mixing journal modes from different threads

2014-08-21 Thread Simon Slavin
On 21 Aug 2014, at 8:17pm, George Ionescu wrote: > I only asked on the mailing list because I couldn't find this kind of > information in the docs (or I didn't look thoroughly enough); if it's the > first case, perhaps it should be mentioned somewhere...

Re: [sqlite] Mixing journal modes from different threads

2014-08-21 Thread George Ionescu
Good evening Dr. Hipp, ok, got it. Thank you for the quick clarification. I only asked on the mailing list because I couldn't find this kind of information in the docs (or I didn't look thoroughly enough); if it's the first case, perhaps it should be mentioned somewhere... Thanks again, George.

Re: [sqlite] Mixing journal modes from different threads

2014-08-21 Thread Richard Hipp
On Thu, Aug 21, 2014 at 3:05 PM, George Ionescu wrote: > Hello dear sqlite users, > > is it ok to mix journal modes from different threads accessing the same > database? > SQLite does not allow you to mix WAL mode with other journal modes. Wal-mode is a property of the

[sqlite] Mixing journal modes from different threads

2014-08-21 Thread George Ionescu
Hello dear sqlite users, is it ok to mix journal modes from different threads accessing the same database? The typical scenario is that I use one thread for reading using normal (default) journalling (e.g. only SELECT queries are performed) and two to four threads for writing using WAL

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Richard Hipp
On Thu, Aug 21, 2014 at 2:15 PM, Mario M. Westphal wrote: > > When I understand you correctly, I should/must run an ANALYSIS on existing > databases > SQLite will get the correct answer regardless. But you might get the answer *faster* if you run ANALYZE after significant

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Mario M. Westphal
The sample database was produced by a version of my software which runs the previous (or even an older version of SQLite). My software runs an Analysis as part of a weekly database maintenance procedure. But the users can turn this off or delay it for weeks. Various versions of my software

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Richard Hipp
On Thu, Aug 21, 2014 at 7:35 AM, Mario M. Westphal wrote: > Hi, Richard > > I have prepared a sample database, sample statements and some additional > details and sent it to your email address. > Thanks for sending the sample data. Here is what I found: Your ANALYZE

Re: [sqlite] How do I know the python functions registered on SQLite ?

2014-08-21 Thread Stephan Beal
On Thu, Aug 21, 2014 at 3:46 PM, Baruch Burstein wrote: > Any explanation? I ran into this issue today when using the fossil built-in > sqlite shell, and I thought I remembered that it has a function registered > for getting a raw blob, but couldn't remember the name.

Re: [sqlite] How do I know the python functions registered on SQLite ?

2014-08-21 Thread Dominique Devienne
On Thu, Aug 21, 2014 at 3:46 PM, Baruch Burstein wrote: > On Sun, May 11, 2014 at 12:58 PM, Baruch Burstein > > On Thu, May 8, 2014 at 11:46 PM, Roger Binns > >> SQLite could provide the information as a virtual table or

Re: [sqlite] How do I know the python functions registered on SQLite ?

2014-08-21 Thread Baruch Burstein
On Sun, May 11, 2014 at 12:58 PM, Baruch Burstein wrote: > > On Thu, May 8, 2014 at 11:46 PM, Roger Binns > wrote: > >> >> SQLite could provide the information as a virtual table or similar. A >> ticket was created 7 years ago asking for it, and

Re: [sqlite] Question about coalesce and data types

2014-08-21 Thread Keith Medcalf
>Is there a way to write my own coalesce-Function (or indeed any >function) so that its result has an affinity? The documentation of the >sqlite3_result_* family of functions suggests not. No. But you can cast the result to whatever type you wish: cast(coalesce(a, 5) as TEXT) and it will

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Richard Hipp
On Thu, Aug 21, 2014 at 7:35 AM, Mario M. Westphal wrote: > Hi, Richard > > I have prepared a sample database, sample statements and some additional > details and sent it to your email address. > Thanks for the info. I'll look into the performance regression as soon as I get a

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Mario M. Westphal
Hi, Richard I have prepared a sample database, sample statements and some additional details and sent it to your email address. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Question about coalesce and data types

2014-08-21 Thread Martin Engelschalk
Am 21.08.2014 11:39, schrieb Clemens Ladisch: Martin Engelschalk wrote: It seems the solution is to actually pass all bind variable values by their appropriate sqlite3_bind_* - function instead of just using sqlite3_bind_text. However, this means quite a lot of work for me. Isn't it also work

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Richard Hipp
On Thu, Aug 21, 2014 at 5:18 AM, Richard Hipp wrote: > > > > On Thu, Aug 21, 2014 at 3:21 AM, Mario M. Westphal wrote: > >> Hi, >> >> >> >> Information provided as requested. >> > > But not in a form that we can use. > > Please bring up your database file in a

Re: [sqlite] Question about coalesce and data types

2014-08-21 Thread Clemens Ladisch
Martin Engelschalk wrote: > It seems the solution is to actually pass all bind variable values by > their appropriate sqlite3_bind_* - function instead of just using > sqlite3_bind_text. However, this means quite a lot of work for me. Isn't it also work for you to converting your values to text?

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Clemens Ladisch
Mario M. Westphal wrote: > _temptable is a temporary table which contains a list of oids (integer, ~ 10 > rows) to consider. The information that oid is INTEGER PRIMARY KEY would have been helpful ... > For query 2.1 > > selectid order from detail > 1 0 0

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Richard Hipp
On Thu, Aug 21, 2014 at 3:21 AM, Mario M. Westphal wrote: > Hi, > > > > Information provided as requested. > But not in a form that we can use. Please bring up your database file in a new 3.8.6 sqlite3.exe shell and type ".fullschema" and then post the output. You might want

Re: [sqlite] Question about coalesce and data types

2014-08-21 Thread Martin Engelschalk
Hello Clemens, thank you for your answer; i understand now why the where - condition returns 'false'. Also, the effect is independent of the function used. It seems the solution is to actually pass all bind variable values by their appropriate sqlite3_bind_* - function instead of just using

Re: [sqlite] Severe performance degradation between 3.8.4.3 and

2014-08-21 Thread Mario M. Westphal
Hi, Information provided as requested. _temptable is a temporary table which contains a list of oids (integer, ~ 10 rows) to consider. Stats3 tbl idx neqnlt ndltsample stack_elem idx_rel_stack_elem_soid 4

Re: [sqlite] Severe performance degradation between 3.8.4.3 and 3.8.6

2014-08-21 Thread Clemens Ladisch
Mario M. Westphal wrote: > The new version is 10 or more times slower than the previous build I used > (3.8.4.3). > [...] > If more information or sample data is needed, let me know. What is _temptable? If you have run ANALZYE, what are the contents of the sqlite_stat* tables? What is the