[sqlite] design problem involving trigger

2015-08-24 Thread Will Parsons
On Monday, 24 Aug 2015 2:46 AM -0400, Mark Lawrence wrote: >> It's theoretically possible, but in that case I would be content to >> force a difference in the title. It should be possible to have the >> following: >> >> 'History of Scotland' | -> 'A. Jones' >> 'History of Scotland' | -> 'T.

[sqlite] Performance problems on windows

2015-08-24 Thread Richard Hipp
I don't have any clues. While most of our work happens on Linux, we do measure performance on Windows from one release to the next (see for example item 23-b on the most recent release check-list https://www.sqlite.org/checklists/private/3081100/index#c23) and it gets better from one release to

[sqlite] Threading-mode for an encrypted database

2015-08-24 Thread Richard Hipp
On 8/24/15, Daniel Coles wrote: > Hello, > > Our application is to use SQLite to store its data. It uses a > multi-threaded server, though in most cases SQLite would be accessed by one > thread at a time. The application runs on Microsoft Windows. > > Our initial SQLite implementation followed

[sqlite] SQlite database access over wireless network

2015-08-24 Thread Eduardo Morras
On Mon, 24 Aug 2015 16:43:40 + (UTC) Mike McWhinney wrote: > Hello, > I am trying to troubleshoot a problem that I'm having with a program > usingSQLite over a wireless network.? I know that wireless networks > can havetheir own sets of issues that cause database access problems. > What is

[sqlite] PRAGMA cache_size and ATTACHED DBs

2015-08-24 Thread R.Smith
The cache size pragma dictates to (and affects) the connection, not the DB. So yes. On 2015-08-24 07:30 PM, jose i cabrera wrote: > > Greetings! > > When connecting to a DB, and setting a PRAGMA cache_size, will the > attached DB also respond/behave the same way/size set by the original >

[sqlite] SQlite database access over wireless network

2015-08-24 Thread R.Smith
On 2015-08-24 06:43 PM, Mike McWhinney wrote: > Hello, > I am trying to troubleshoot a problem that I'm having with a program > usingSQLite over a wireless network. I know that wireless networks can > havetheir own sets of issues that cause database access problems. > What is happening is

[sqlite] Proper way to abort

2015-08-24 Thread Jean-Christophe Deschamps
> >I have some queries that may take 5-15 seconds to complete. Sometimes >the situation changes shortly after starting the query where my >program does not need those results anymore and the program wants to >abort and begin a different query instead. > >My question is: What is the proper way

[sqlite] Proper way to abort

2015-08-24 Thread Zsbán Ambrus
On Mon, Aug 24, 2015 at 6:22 PM, Scott Doctor wrote: > I have some queries that may take 5-15 seconds to complete. Sometimes the > situation changes shortly after starting the query where my program does not > need those results anymore and the program wants to abort and begin a > different query

[sqlite] SQlite database access over wireless network

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 5:43pm, Mike McWhinney wrote: > What is happening is that something that takes 1 or 2 seconds on a > wirednetwork will take 15-20 seconds over wireless. I did two downloads of a big .zip file earlier today, one via WiFi, the other via Ethernet. They came from the same

[sqlite] Wierd Locking problem

2015-08-24 Thread Luc Andre
We use straight SQLITE3 PHP Extension sot we don\ not have that much customization level. On Mon, Aug 24, 2015 at 5:44 PM, Eduardo Morras wrote: > On Mon, 24 Aug 2015 16:03:24 +0200 > Luc Andre wrote: > > > Hi All, > > > > Our web servers use a daily updated sqlite database file. > > > > The

[sqlite] Wierd Locking problem

2015-08-24 Thread Eduardo Morras
On Mon, 24 Aug 2015 16:03:24 +0200 Luc Andre wrote: > Hi All, > > Our web servers use a daily updated sqlite database file. > > The file is opened by multiple (apache/PHP) threads but always in > read only mode: > > $db = new SQLite3(DB_FILE, SQLITE3_OPEN_READONLY); > > The file itself has

[sqlite] Threading-mode for an encrypted database

2015-08-24 Thread Daniel Coles
Hello, Our application is to use SQLite to store its data. It uses a multi-threaded server, though in most cases SQLite would be accessed by one thread at a time. The application runs on Microsoft Windows. Our initial SQLite implementation followed our interpretation of the guidelines laid

[sqlite] Wierd Locking problem

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 3:45pm, Luc Andre wrote: > I'm sure no process open the file using the SQLite API in write mode. You are, but the software has to check for it, and occasionally two of your threads do the same check at the same time. I'm afraid that if you have already set a timeout I

[sqlite] Wierd Locking problem

2015-08-24 Thread Luc Andre
On Mon, Aug 24, 2015 at 4:38 PM, Simon Slavin wrote: > > On 24 Aug 2015, at 3:03pm, Luc Andre wrote: > > > PHP Notice: SQLite3Stmt::execute(): Unable to execute statement: database > > is locked > > SQLite3::prepare(): Unable to prepare statement: 5, database is locked > >

[sqlite] SQlite database access over wireless network

2015-08-24 Thread Mike McWhinney
Hello, I am trying to troubleshoot a problem that I'm having with a program usingSQLite over a wireless network.? I know that wireless networks can havetheir own sets of issues that cause database access problems. What is happening is that something that takes 1 or 2 seconds on a wirednetwork

[sqlite] Wierd Locking problem

2015-08-24 Thread Luc Andre
Hi All, Our web servers use a daily updated sqlite database file. The file is opened by multiple (apache/PHP) threads but always in read only mode: $db = new SQLite3(DB_FILE, SQLITE3_OPEN_READONLY); The file itself has no write access. -rw-r--r-- 1 root root 225759232 Aug 24 13:43 db.sqlite

[sqlite] Wierd Locking problem

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 3:03pm, Luc Andre wrote: > PHP Notice: SQLite3Stmt::execute(): Unable to execute statement: database > is locked > SQLite3::prepare(): Unable to prepare statement: 5, database is locked > SQLite3::querySingle(): Unable to execute statement: database is locked > > We can not

[sqlite] Performance problems on windows

2015-08-24 Thread Jakub Zakrzewski
Hi All, I finally got a chance to upgrade SQLite for our product from ancient 3.7.16.2. Initial tests on Linux were very promising - ranging from 33% to even 300% (for one degenerated case) speed improvement. So far so good. Problems begun when I have tested it on Windows. Depending on test

[sqlite] PRAGMA cache_size and ATTACHED DBs

2015-08-24 Thread jose i cabrera
thanks. On 8/24/2015 1:34 PM, R.Smith wrote: > The cache size pragma dictates to (and affects) the connection, not > the DB. > > So yes. > > > On 2015-08-24 07:30 PM, jose i cabrera wrote: >> >> Greetings! >> >> When connecting to a DB, and setting a PRAGMA cache_size, will the >> attached DB

[sqlite] PRAGMA cache_size and ATTACHED DBs

2015-08-24 Thread jose i cabrera
Greetings! When connecting to a DB, and setting a PRAGMA cache_size, will the attached DB also respond/behave the same way/size set by the original connection? Thanks. jos?

[sqlite] Lua inside SQLite

2015-08-24 Thread Dominique Devienne
On Sun, Aug 23, 2015 at 10:55 PM, Richard Hipp wrote: > Regular SQL functions always return scalars in SQLite. > > See https://www.sqlite.org/src/artifact/b8fb7befd85b3a9b for an > example of how to implement table-valued functions. This is a new > feature so there is no documentation on it

[sqlite] design problem involving trigger

2015-08-24 Thread Mark Lawrence
On Mon Aug 24, 2015 at 08:46:57AM +0200, Mark Lawrence wrote: > > You can achieve this using a partial index[1] on the Books.title > column, which is used only when the author is null. A test script to My apologies. It appears from the mailing list archive this was already mentioned, but I

[sqlite] Compile warnings

2015-08-24 Thread David Bennett
I think we've beaten the philosophy to death and we're largely in agreement. I'm not sure we actually came up with a firm recommendation as to what to do about this specific warning in this particular line of code with this compiler. Ostrich treatment maybe, and rely on the general Sqlite

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/24/2015 03:08 AM, Jeff M wrote: > I've checked all of your suggestions and nothing is amiss. You ran valgrind and it said everything is fine? That would be shocking. > I don't understand how the main thread can run before the > background

[sqlite] Proper way to abort

2015-08-24 Thread Scott Doctor
Sheesh, how did I miss that. Guess I need new glasses. Thats exactly what I was looking for. Scott Doctor scott at scottdoctor.com -- On 8/24/2015 9:39 AM, Jean-Christophe Deschamps wrote: > >> >> I have some queries that may take 5-15 seconds to complete. >>

[sqlite] Compile warnings

2015-08-24 Thread Scott Robison
On Aug 24, 2015 6:29 AM, "David Bennett" wrote: > > I think we've beaten the philosophy to death and we're largely in agreement. > > I'm not sure we actually came up with a firm recommendation as to what to do > about this specific warning in this particular line of code with this > compiler.

[sqlite] Proper way to abort

2015-08-24 Thread Scott Doctor
I have some queries that may take 5-15 seconds to complete. Sometimes the situation changes shortly after starting the query where my program does not need those results anymore and the program wants to abort and begin a different query instead. My question is: What is the proper way to abort

[sqlite] design problem involving trigger

2015-08-24 Thread Mark Lawrence
> It's theoretically possible, but in that case I would be content to > force a difference in the title. It should be possible to have the > following: > > 'History of Scotland' | -> 'A. Jones' > 'History of Scotland' | -> 'T. Smith' > 'Manual of DOS' | NULL > > But, an attempt to insert

[sqlite] ESC_BAD_ACCESS when using a background thread

2015-08-24 Thread Jeff M
Simon, Roger: I've checked all of your suggestions and nothing is amiss. The background thread fetches the image data and caches it by adding the data to an NSMutableDictionary. The main thread checks the dictionary and does the lazy-load only if the desired image data is not in the cache.

[sqlite] ATTACH DATABASE statement speed

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 2:48am, Simon Slavin wrote: > My suspicion here is that there's a design fault in ZFS. To correct myself here, what I meant to write was that there was a fault in the implementation of ZFS that Paolo is using, not in the basic design of ZFS itself. Simon.

[sqlite] ATTACH DATABASE statement speed

2015-08-24 Thread Simon Slavin
On 24 Aug 2015, at 2:32am, Roger Binns wrote: > On 08/19/2015 05:56 PM, Paolo Bolzoni wrote: >> I left running the pragma quick check during the night and finished >> in 2 hours and 46 minutes, so it is about 8 times slower than in >> ext4. Zfs is an advanced filesystem plenty of features, but

[sqlite] DbFunctions.TruncateTime

2015-08-24 Thread Kevin Benson
On Sun, Aug 23, 2015 at 10:53 PM, Joe Mistachkin wrote: > > The LINQ provider for System.Data.SQLite does not provide this function > directly; however, it may be possible to use one of the core date-time > related SQL functions to do it? > > https://www.sqlite.org/lang_datefunc.html >