Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Neo Anderson
Thanks for your clarification. > From: h...@scigames.at > To: sqlite-users@sqlite.org > Date: Mon, 9 Feb 2015 07:18:29 + > Subject: Re: [sqlite] Multi-thread mode question > > In serialized mode, SQLite will acquire the mutex when it detects you are >

Re: [sqlite] equivalent for JOIN LATERAL

2015-02-08 Thread Darren Duncan
I recall that http://blog.heapanalytics.com/postgresqls-powerful-new-join-type-lateral/ shows how Pg 9.3's LATERAL join is useful in practice, as it lets you do in declarational SQL what you may have needed procedural code for before, in which case it is an improvement. -- Darren Duncan On

Re: [sqlite] equivalent for JOIN LATERAL

2015-02-08 Thread Big Stone
oups ! Thank you Roger, I had forgot to post the link. I got it via a tweet of Wes McKinney, one of the DataScience leader in the Python World. https://twitter.com/wesmckinn/status/564526251591733248 ___ sqlite-users mailing list

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Hick Gunter
In serialized mode, SQLite will acquire the mutex when it detects you are "starting to use" the database handle (somewhere between entering sqlite3_prepare and the first sqlite3_step) and then HANG ON TO IT, NOT LETTING GO until the calling thread is "finished" (like when sqlite3_step returns

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Keith Medcalf
And those mutexes around statement usage apply the mutex based on the underlying connection, not the statement (which is irrelevant)? --- Theory is when you know everything but nothing works. Practice is when everything works but no one knows why. Sometimes theory and practice are combined:

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Neo Anderson
> Does the application work if you configure SQLite to serialized mode? Yes. But I am confused why serialized mode works while multi-thread mode always cause crashes because I also wrap calls around statement handle. > even if you wrap the sqlite3_ calls... you'll need to wrap the entire >

Re: [sqlite] equivalent for JOIN LATERAL

2015-02-08 Thread James K. Lowden
On Sun, 8 Feb 2015 23:52:43 +0100 Big Stone wrote: > I fall over this presentation of LATERAL, from postgresql guys. > > Does it exist in SQLITE ? Syntactically, no. Functionally, in part. > If not, would it be possible too much effort ? I'm guessing the answer is No

Re: [sqlite] equivalent for JOIN LATERAL

2015-02-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/08/2015 03:32 PM, Simon Slavin wrote: > For those like me who hadn't heard of it, here's a reference: Here is a presentation referenced "Modern SQL in PostgreSQL", with title "Still using Windows 3.1? So why stick to SQL-92?" Lots of nice

Re: [sqlite] equivalent for JOIN LATERAL

2015-02-08 Thread Simon Slavin
On 8 Feb 2015, at 10:52pm, Big Stone wrote: > I fall over this presentation of LATERAL, from postgresql guys. > (look at pages 1 to 16) For those like me who hadn't heard of it, here's a reference:

Re: [sqlite] equivalent for JOIN LATERAL

2015-02-08 Thread Big Stone
If not, would it be possible "without" too much effort ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] equivalent for JOIN LATERAL

2015-02-08 Thread Big Stone
Hello, I fall over this presentation of LATERAL, from postgresql guys. (look at pages 1 to 16) Does it exist in SQLITE ? If not, would it be possible too much effort ? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] ordinary CTE containing sum()

2015-02-08 Thread James K. Lowden
On Sun, 8 Feb 2015 09:57:54 -0500 Doug Currie wrote: > tonypdmtr on SO > posted a CTE solution; it is something like this, which works for me: > > with tt (S_id, total) as >(select S_id, sum(ca1) + sum(ca2) +

Re: [sqlite] Bug in SQLite FLOAT values

2015-02-08 Thread Keith Medcalf
A double precision floating point value contains about 14.5 to 16 digits of precision WHEN CONVERTED FROM BINARY TO DECIMAL TEXT. However, the double precision number is merely the closest binary approximation of a value as can be encoded in BINARY (base 2) format. Exact DEMAL (base 10)

Re: [sqlite] ordinary CTE containing sum()

2015-02-08 Thread Darko Volaric
I'm interested in this too (since I rely on it working). According to the documentation this should be perfectly legal and seems like an arbitrary limitation (or a bug). It says: "An ordinary common table expression works as if it were a view that exists for the duration of a single statement."

Re: [sqlite] Bug in SQLite FLOAT values

2015-02-08 Thread Simon Slavin
On 7 Feb 2015, at 2:22pm, Abdul Aziz wrote: > but in fields which were FLOAT were > filling with junk values (after 6 decimal places, see in SENSOR_1) why? Take a look at what happens when you try to write 1/13th in decimal:

[sqlite] SQLite Toolbox - free Visual Studio extension

2015-02-08 Thread Erik Ejlskov Jensen
I have recently released this free VS addin, also Works with the free VS 2013 Community edition. Blog post: http://erikej.blogspot.dk/2014/08/sqlite-toolbox-40-visual-guide-of.html Channel 9 video: http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/SQL-Server-Compact-and-SQLite-Toolbox

Re: [sqlite] Bug in SQLite FLOAT values

2015-02-08 Thread Abdul Aziz
OK, understood, thanks but can anyone explain me I was creating db of different sensors, I used same methods, but in fields which were FLOAT were filling with junk values (after 6 decimal places, see in SENSOR_1) why? even I was cutting it to 6 decimal places (as shown previously, was then again

Re: [sqlite] v3.5.0 of DB Browser for SQLite released

2015-02-08 Thread justin
It turned out there were a few important bugs in 3.5.0, so now there's a v3.5.1 with fixes for them. https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.5.1 Hope that's useful to people. :) + Justin On 2015-01-31 18:46, jus...@postgresql.org wrote: Hi all, We've just released

Re: [sqlite] ordinary CTE containing sum()

2015-02-08 Thread Doug Currie
> > > In response to this SO question: > > > > > http://stackoverflow.com/questions/28377210/how-to-retrieve-rank-based-on-total-mark-in-sqlite-table > > > > I tried to formulate a query without temp tables using an ordinary > > CTE, but received an error "misuse of aggregate: sum()". > tonypdmtr

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread J Decker
it's better to use a connection per thread... the connection resource isn't very big... even if you wrap the sqlite3_ calls... you'll need to wrap the entire lifetime of the statment... if you do a execute and then start stepping and getting values while another thread starts another statement...

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread Dan Kennedy
On 02/08/2015 04:30 PM, Neo Anderson wrote: The doc says: Multi-thread. In this mode, SQLite can be safely used by multiple threads provided that no single database connection is used simultaneously in two or more threads. I have a scenario that every sqlite3_calls around a single database

[sqlite] Multi-thread mode question

2015-02-08 Thread Neo Anderson
The doc says: Multi-thread. In this mode, SQLite can be safely used by multiple threads provided that no single database connection is used simultaneously in two or more threads. I have a scenario that every sqlite3_calls around a single database connection is protected by a recursive mutex,