Re: [sqlite] Use sqlite3_update_hook() to watch for changes

2009-03-22 Thread Ian Frosst
One method you can use to see changes is to hook up triggers on update/insert. Since you can add functions to be called from SQL, you just have to add whatever IPC system you desire as an SQLite function (see sqlite_create_function). This function can then be invoked through your triggers, and a

Re: [sqlite] Transaction behavior with large numbers of inserts

2009-01-28 Thread Ian Frosst
So thinking about this, what would be the impediment (apart from current implementation, of course,) to implementing a disk-based temp file page cache, that could grow arbitrarily large? Operations against the page cache in memory are already lost if your process dies before commission. Are there

[sqlite] Transaction behavior with large numbers of inserts

2009-01-27 Thread Ian Frosst
I have an application which on a single thread writes data to a database. This writing can result in millions of writes to the database in a single transaction (started with BEGIN TRANSACTION.) I also have other threads and processes which read the same database, but never write to it, and never s

[sqlite] How to get older source

2007-12-04 Thread Ian Frosst
I'm trying to access the 3.4.2 (and previous) sources from the website by changing the version numbers in the source download link to various values, which has worked for me in the past. If I use the following links, things work and I can get both the long form and amalgamated sources: http://sql

Re: [sqlite] why select distinct does not use index?

2007-11-08 Thread Ian Frosst
In the call to create index, it looks like you're creating a duplicate index on [id], which I believe references the default btree id (also called rowid.) If you change that line to: CREATE INDEX [by_id] ON [profile_data] ([profile_id]); your index should be used (though whether indexes get use

Re: [sqlite] Proposed incompatible change to SQLite

2007-08-09 Thread Ian Frosst
A most welcome modification. On 8/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > We are considering a change to the SQLite API which is > technically not backwards compatible. On the other hand, > it is difficult to imagine a situation where the change > would cause anyone any serious ha

Re: [sqlite] SQLite 64-Bit

2007-07-04 Thread Ian Frosst
I build SQLite's code using Visual Studio 2005 using the 64 bit tool chain, and it runs without a hitch. I haven't seen a pre-compiled library for it, so you may have to get your hands a bit dirty. Building it is a snap though; add the sqlite3.c and sqlite3.h files to a project, define NO_TCL an

Re: [sqlite] Database File size not exceeding 2GB

2007-07-04 Thread Ian Frosst
Is the file system holding your file Fat32, or NTFS? If it's Fat32, it may be the source of your problem, as it doesn't support very large files. Ian On 7/4/07, Krishnamoorthy, Priya (IE10) <[EMAIL PROTECTED]> wrote: Hi all, I am using SQLite3 database in my application. My application

Re: [sqlite] Concurrency

2007-06-01 Thread Ian Frosst
Friday, June 01, 2007 Ian Frosst wrote: > On the topic of a more efficient busy handler, one approach I considered was > to implement an event which was signalled when a database unlock occurred. > That way, the busy handler could just wait on the event (which is an > efficient wait state),

Re: [sqlite] Concurrency

2007-06-01 Thread Ian Frosst
On the topic of a more efficient busy handler, one approach I considered was to implement an event which was signalled when a database unlock occurred. That way, the busy handler could just wait on the event (which is an efficient wait state), and be guaranteed of a wake up when the lock is releas

[sqlite] Clarification of bound parameter usage

2007-03-22 Thread Ian Frosst
Hi all, I'm looking for some clarification on the usage of bound parameters in queries. I have one SQL statement that is going to be executed numerous times (thousands of times, in a fairly tight loop.) Right now I am using a string, "INSERT INTO tableX (col1, col2) VALUES ('%s', '%s')". and cal

Re: [sqlite] Causes of SQLITE_SCHEMA errors

2007-03-06 Thread Ian Frosst
t http://www.sqlabs.net/blog/ http://www.sqlabs.net/realsqlserver/ On Mar 6, 2007, at 2:22 PM, Ian Frosst wrote: > Hey all, I've got a bit of an odd situation going on. I have a fairly > heavily threaded app making use of SQLite (which is working > beautifully for > the most pa

[sqlite] Causes of SQLITE_SCHEMA errors

2007-03-06 Thread Ian Frosst
Hey all, I've got a bit of an odd situation going on. I have a fairly heavily threaded app making use of SQLite (which is working beautifully for the most part.) However, I've run into a bit of a situation. It seems that I have a periodic occurrence of SQLITE_SCHEMA occurring when executing som

Re: [sqlite] sqlite / gac

2007-02-04 Thread Ian Frosst
t know whether that is all that is required. Is System.Data.SQLite, then, a managed wrapper around the unmanaged part of SQLite? Andrew On Sun, Feb 04, 2007 at 08:16:50AM -0400, Ian Frosst wrote: > SQLite isn't managed code: it's unmanaged. As such, unless you write the > p/inv

Re: [sqlite] sqlite / gac

2007-02-04 Thread Ian Frosst
On 2/4/07, Andrew <[EMAIL PROTECTED]> wrote: Hi.. I'm writing a small application for my personal use and would like to try SQLite. I have a few basic questions that I didn't see answers for at sqlite.org and am hoping that someone on this list can help. First, I'd like to get SQLite installe

Re: [sqlite] SQLite last inserted id

2007-01-22 Thread Ian Frosst
My issue with that is I need the rowid of the existing row back. Insert or ignore doesn't seem to update the database's last_insert_rowid in the ignore case, from what I've seen. Insert or Replace almost does it, but it re-allocates the rowid, which breaks my referential integrity. Should the I

Re: [sqlite] SQLite last inserted id

2007-01-22 Thread Ian Frosst
I would like to solicit ideas on this as well. An operation similar to insert or replace, but that doesn't allocate a new row ID on replace (just returns the old one through the last insert row ID.) Having to do the search operation, and if it fails do an insert (or vice versa) doesn't seem opti

Re: [sqlite] Performance test on windows

2007-01-18 Thread Ian Frosst
It could be that there is no transaction block wrapped around the inserts (a BEGIN TRANSACTION before the start of the insert loop, and a COMMIT TRANSACTION at the end.) If there is no explicit transaction, then every insert has an implied transaction, which considerably slows down the database e

[sqlite] Re: SQLite 3.3.10 compilation with VC++ for Win64

2007-01-16 Thread Ian Frosst
ndows boxes (I know it runs perfectly fine in the Wow64 subsystem, but we're trying to do a native 64 bit version of the app I'm working on, which requires a native 64 bit build of SQLite for windows.) If someone has tried a build using the Microsoft 64 bit compiler, and had it work succes

[sqlite] SQLite 3.3.10 compilation with VC++ for Win64

2007-01-15 Thread Ian Frosst
Has anyone here gotten 3.3.10 (or any subsequent version) to compile and run successfully through Visual C++ (I'm using 2005, but again, any version would do.) Looking at the code, there are pointer to int truncations everywhere, and I've found no magic bullet for declalring int's as 64 bit (__in