[sqlite] Fastest way to insert lots of data

2009-07-24 Thread Zachary Turner
What kind of performance can I expect to get from sqlite inserting many many rows of blob data into a database? I know this depends on many factors, but I'm a little puzzled because I have written some tests that allow me to test various ways of inserting data and as far as I can tell I've

[sqlite] sqlite_mem_methods

2009-07-23 Thread Zachary Turner
I was looking into overriding the sqlite_mem_methods interface to specify my own allocator. The two functions I have a question about are these: int (*xSize)(void*) int (*xRoundup)(int size); I've briefly looked over the source code it *seems* like I can safely return 0 from xSize and 'size'

[sqlite] Extending the db file [was: Memory leak on inserting from sqlite c/c++ interfaces]

2009-07-23 Thread Zachary Turner
On Wed, Jul 22, 2009 at 3:22 PM, Igor Tandetnik<itandet...@mvps.org> wrote: > Zachary Turner <divisorthe...@gmail.com> > wrote: >> I still don't understand the transactions.  For example, I issue a >> single BEGIN at the start of my application and then insert about

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Wed, Jul 22, 2009 at 1:42 PM, Pavel Ivanov wrote: > > Again, try to call sqlite3_memory_used() several times during work of > your application. What does it say to you? It says it's using about 3MB. Which suggests maybe it's my application. I believe I've identified the

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Wed, Jul 22, 2009 at 10:47 AM, Pavel Ivanov wrote: > SQLite synchronizes with disk during every commit (either issued by > yourself or automatic) at least 2 times (I don't know exact number). > So it's quite natural that it spends most of the time in winSync(). > But I still

Re: [sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-22 Thread Zachary Turner
On Tue, Jul 21, 2009 at 6:45 PM, Pavel Ivanov wrote: >> If I remove or comment out the >> three lines with //* in the code above, I get no memory leaks. > > So basically you're saying that if you don't insert any data into your > database and thus effectively don't do with your

[sqlite] Memory leak on inserting from sqlite c/c++ interfaces

2009-07-21 Thread Zachary Turner
Hello, I'm a bit new to sqlite, I wonder if someone can advise me here. I'm using the Sqlite C/C++ interfaces, and I'm trying to do some very basic things. Currently I'm just creating a database with 1 table, and this table has 1 column of type blob. I then read some data out of a file and