[sqlite] Slow response using WHERE - IN

2014-07-25 Thread jose isaias cabrera
Greetings. I have a slow response problem... This command, used in conjunction with an another much bigger attached DB (client), BEGIN; INSERT OR REPLACE INTO LSOpenProjects SELECT * FROM client.LSOpenProjects as A WHERE id IN ( SELECT id from LSOpenProjects WHE

[sqlite] CheckIn fb1048cb2b613a0dbfe625a5df05e9dcd736a433

2014-07-25 Thread Keith Medcalf
Introduces a conflict if the fileio extension has already been incorporated into the sqlite3.c source as an internal extension since the same function names are used. This is only a problem if one "adds" the sqlite3.c + extensions + shell.c to compile a static shell. _

Re: [sqlite] Sometimes when my process restarts, it returns error "database is locked"

2014-07-25 Thread Simon Slavin
On 26 Jul 2014, at 12:42am, Mayank Kumar (mayankum) wrote: > I think you mean this "sqlite3_busy_timeout(db, 2000);" That will do fine. > I am already using this api with busy time of 2sec , but some of my codepaths > didn't exit the process without closing the db. So I guess I am still goin

Re: [sqlite] Sometimes when my process restarts, it returns error "database is locked"

2014-07-25 Thread Mayank Kumar (mayankum)
Hi Simon I think you mean this "sqlite3_busy_timeout(db, 2000);" I am already using this api with busy time of 2sec , but some of my codepaths didn't exit the process without closing the db. So I guess I am still going to fix that first. I don't want to increase this more than 2 sec, since ther

Re: [sqlite] SQLite bug report: type mismatch security issue in sqlite3.c version 3.7.13

2014-07-25 Thread Richard Hipp
On Fri, Jul 25, 2014 at 9:50 AM, Yunjiao Xue wrote: > To whom it may concern, > > We are using SQLite 3.7.13 with an amalgamation version of sqlite3.c. We > discovered a type mismatch security issue with a recent Fortify scan. The > problem is on lines 22407, 51807, 63005, 93150 of sqlite3.c. >

[sqlite] SQLite bug report: type mismatch security issue in sqlite3.c version 3.7.13

2014-07-25 Thread Yunjiao Xue
To whom it may concern, We are using SQLite 3.7.13 with an amalgamation version of sqlite3.c. We discovered a type mismatch security issue with a recent Fortify scan. The problem is on lines 22407, 51807, 63005, 93150 of sqlite3.c. For example, the function strHash() in sqlite3.c is declared to

Re: [sqlite] Transaction issues with WinRT build

2014-07-25 Thread pantelis.geo
Hello, Could you please provide some example of your code? I would like to see in what order the commands of the transaction are before you insert data to the database. It would be very helpful. begin transaction queries commit/rollback Thank you. -- View this message in context: http://sqli

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Green
> Thanks guys, I have already tried WAL and it does speed things up, but I > still need the daily processing to be done asynchronously. The computations > are complex, involving around 16 inputs from the player table and resulting > in 8 outputs. This is core to the game and not a simple score

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Tom
Thanks Richard. Yeah I now need two threads writing concurrently - my requirements have changed from when I first started using SQLite. But anyway SQLite is awesome. Thank you. On Fri, Jul 25, 2014 at 6:58 PM, Richard Hipp-3 [via SQLite] < ml-node+s1065341n76965...@n5.nabble.com> wrote: > On Fr

Re: [sqlite] Producing RFC4180-compliant CSV output

2014-07-25 Thread Peter Waller
That was quick, thanks! :) On 24 July 2014 13:21, Richard Hipp wrote: > > > > On Thu, Jul 24, 2014 at 7:47 AM, Richard Hipp wrote: > >> >> >> >> On Thu, Jul 24, 2014 at 6:15 AM, Peter Waller >> wrote: >> >>> Unfortunately, we already tried this, sed, and writing our own >>> translation >>> pr

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Markus Schaber
Hi, Von: Tom > This seems like a really major difference to MySQL. > MySQL with InnoDB allows concurrent writes to different rows in the same > table. > SQLite doesn't even allow concurrent writes to the same DB. > So MySQL has write concurrency, SQLite does not. Guess that's what I'm > learning

Re: [sqlite] DMV available in Sqlite?

2014-07-25 Thread Simon Slavin
On 25 Jul 2014, at 2:54am, andy wrote: > All I want to do is write a conditional-compilation-flag-driven approach > that investigates every single SQLite query and dumps the query results to a > table, so I can inspect it later in order to fix worse queries, missing > indexes, etc. Would EXPLAI

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Richard Hipp
On Fri, Jul 25, 2014 at 4:46 AM, Tom wrote: > I probably should have read the bit about concurrency on > http://www.sqlite.org/whentouse.html huh :-) > Although in my defense, my need for write concurrency is new. > I do wonder if 2 DB's will work well. > My understanding is that you have one re

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Richard Hipp
On Fri, Jul 25, 2014 at 1:58 AM, Tom wrote: > This seems like a really major difference to MySQL. > SQLite solves a completely different problem from MySQL. The two are not comparable. SQLite is striving to be an Application File Format. MySQL wants to be an Enterprise Data Depot. It sounds

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Tom
I probably should have read the bit about concurrency on http://www.sqlite.org/whentouse.html huh :-) Although in my defense, my need for write concurrency is new. I do wonder if 2 DB's will work well. On Fri, Jul 25, 2014 at 1:58 PM, Tom Spencer-Smith wrote: > > This seems like a really major

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Tom
This seems like a really major difference to MySQL. MySQL with InnoDB allows concurrent writes to different rows in the same table. SQLite doesn't even allow concurrent writes to the same DB. So MySQL has write concurrency, SQLite does not. Guess that's what I'm learning here. Maybe I should consid

Re: [sqlite] Does SQLite lock the entire DB for writes, or lock by table?

2014-07-25 Thread Tom
Thanks guys, I have already tried WAL and it does speed things up, but I still need the daily processing to be done asynchronously. The computations are complex, involving around 16 inputs from the player table and resulting in 8 outputs. This is core to the game and not a simple score leaderboard.

Re: [sqlite] DMV available in Sqlite?

2014-07-25 Thread andy
Thanks for the tip. I was not aware of sqlite3_stmt_status(). Now I was trying to find the equivalent call in System.Data.Sqlite.dll (.NET wrapper) but could not find it. I looked a little at the source code and found that there is an UnsafeNativeMethods class that exports this C call to the manag