Re: [sqlite] Allow users to directly submit bug reports to the tracker

2017-07-07 Thread Simon Slavin
On 7 Jul 2017, at 3:49pm, 積丹尼 Dan Jacobson wrote: > I recommend allowing users to directly submit bugs to the bug tracker. This list is the bug tracker. Users can directly submit bugs here. > In fact the is how all other software project do it. Really ? Every single

Re: [sqlite] Slow query, with correlated sub-sub-query

2017-07-07 Thread David Raymond
Also of note is that when you make an index on ab (size), your original query, unchanged, becomes about 3 times faster than my modification. I'm not sure on what it looks at to decide if a temporary autoindex is worth it, but in this case it would have been. When you move back to your more

Re: [sqlite] SQLITE_ERROR ("SQL error or missing database") should be split into two codes: "SQL error" and "missing database"

2017-07-07 Thread Yuri
On 07/07/2017 12:04, Simon Slavin wrote: I note that the "extended result code" feature is relevent: You’re proposing two error codes like SQLITE_FILE_NODATABBASE SQLITE_FILE_NOTADATABBASE for a missing database file, and for one which has the

[sqlite] Slow query, with correlated sub-sub-query

2017-07-07 Thread E.Pasma
Thanks David for the alernative solution, that is 500 times faster or any times faster depending on the number of rows. I hope this does not derive attention from my point that the original construction is not very well delt with. It was only a theoretical query derived from a more complex

Re: [sqlite] Allow users to directly submit bug reports to the tracker

2017-07-07 Thread Richard Hipp
On 7/7/17, 積丹尼 Dan Jacobson wrote: > I recommend allowing users to directly submit bugs to the bug tracker. > Been there, done that. It did not work well. I spent way too much time deleting tickets that should have never been entered in the first place. The current system

Re: [sqlite] Allow users to directly submit bug reports to the tracker

2017-07-07 Thread Stephen Chrzanowski
On the other side of the coin of that, I find it rather nice that I have one place to see when "bugs" are found, and discussed. Then my having to go to yet another page to track a discussion becomes a bit of a pain. You could argue that I could just setup the tracker to notify me of when changes

[sqlite] SQLITE_ERROR ("SQL error or missing database") should be split into two codes: "SQL error" and "missing database"

2017-07-07 Thread Yuri
Currently SQLITE_ERROR stands for two very different errors: > #define SQLITE_ERROR1 /* SQL error or missing database */ It would make sense to have separate codes for them to avoid possible confusion, because these two errors really have nothing in common. Yuri

Re: [sqlite] SQLITE_ERROR ("SQL error or missing database") should be split into two codes: "SQL error" and "missing database"

2017-07-07 Thread Simon Slavin
On 7 Jul 2017, at 7:36pm, Yuri wrote: > Currently SQLITE_ERROR stands for two very different errors: > > > #define SQLITE_ERROR1 /* SQL error or missing database */ > > It would make sense to have separate codes for them to avoid possible > confusion, because these

[sqlite] Allow users to directly submit bug reports to the tracker

2017-07-07 Thread 積丹尼 Dan Jacobson
I recommend allowing users to directly submit bugs to the bug tracker. Thus bug reports wouldn't be intermixed with questions and discussions. In fact the is how all other software project do it. Else if a bug report is not detected amongst the questions here, the user will feel that submitting

Re: [sqlite] Slow query, with correlated sub-sub-query

2017-07-07 Thread Keith Medcalf
Well of course. You are aware that a correlated subquery means "for each candidate result execute the query"? So as you have formulated the query it means: for each row in a compute the result count which for each ab candidate row calculate whether it is the minimum

Re: [sqlite] Slow query, with correlated sub-sub-query

2017-07-07 Thread E . Pasma
Keith, this definitely explains the observed time as it is relative to count(a)*count (ab)**2, thus non-linear. And a correlated sub-query is generally recalculated for each row. But I do not agree with everything. In my example it is correlated to the outermost query, and not to the

Re: [sqlite] Cannot delete a Database file?

2017-07-07 Thread domonic
Thanks for the help. I eventually figured this out given the points above. I simply output the open address and close address of each database I opened and closed to see if something wasn't being closed. It turned out to be a far more simple problem in the end. A silly one at that. I was

Re: [sqlite] Cannot delete a Database file?

2017-07-07 Thread Simon Slavin
On 8 Jul 2017, at 3:33am, domonic wrote: > No I just test the state > of the database once and then test the output in my if statement. > > if(sqlite3_close(...)) > { > > } > else if(sqlite3_close(..)) > { > > } > else if(sqlite3_close(..)) > { > > } Glad

Re: [sqlite] Cannot delete a Database file?

2017-07-07 Thread Keith Medcalf
Why not set the sqlite3* variable to NULL after a successful close. Then you will always know if it is open or closed ... you can only "open" a database if it is currently closed (NULL) and only close a database (or do anything to it, really) if it is open (!=NULL). You should do the same

[sqlite] Slow query, with correlated sub-sub-query

2017-07-07 Thread E.Pasma
Hello, below is a theoretical query that becomes slow when the number of rows increases. What it does is: - scan input cases in table a - for each input case: -- determine the smallest value of attribute size of elements in table ab -- count the number of elements having this smallest size

Re: [sqlite] Slow query, with correlated sub-sub-query

2017-07-07 Thread David Raymond
I acknowledge you said you weren't so much interested in an alternative solution, but... How about something like select a, min(size) as minSize, recCount from (select a, size, count(*) as recCount from a inner join ab using (a) group by a, size) group by a; The inner one will group by

Re: [sqlite] Doc bug: wal.html should mention proper way to remove wal and shm files

2017-07-07 Thread 積丹尼 Dan Jacobson
> "CL" == Clemens Ladisch writes: CL>> From this, you can deduce how to clean up: close without crashing.[...] CL> You could instead use any command that accesses the database: wal.html should provide specific instructions. Not everybody us an expert.

Re: [sqlite] Doc bug: wal.html should mention proper way to remove wal and shm files

2017-07-07 Thread 積丹尼 Dan Jacobson
Not everybody is an expert. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users