-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Flipphi wrote:
> Is there a way to insert a row of data into a table without having to 
> convert the data to SQL ?

Lookup bindings - using functions like sqlite3_bind_int:

  http://sqlite.org/c3ref/bind_blob.html

> Can we create a object with data and store that into the table ?

If you don't need to act on the data such as doing equality, comparisons
etc then you can create a binary chunk of data (known as a blob) and
dump that as is into the database.

> Wat kind of speed can we expect of the database ?

You will find SQLite to be fast for the amount of memory it uses.  It
doesn't have functionality to use gigabytes of memory to improve speed
but it is *lite* after all.

Generally your performance will be limited by disk speeds and your rate
of transactions will be limited by the disk RPM.  (Unless the disk lies
when it has been told to commit data to metal in which case your data
could be toast should anything untoward happen like a power outage.)

The only reliable way to get an estimate of speed is to write code that
generates queries and access patterns similar to what your application
will do.

> At some error situation we need to insert over 500.000 records a second. 
> I know this is a speed no database will handle, so we have
> a very large buffer in the appliaction, but i need to be sure we can 
> handle this in data in a reasonable time.

You should have a look at the async vfs which does this for you by
queueing writes in the background:

  http://www.sqlite.org/asyncvfs.html

> I read some thing about 50.000 inserts a second (with ease) in the FAQ 
> with START and COMMIT. Any experience ?

It is calling COMMIT that makes for a bottleneck.

> Is there a difference in speed between running the database on linux or 
> windows ?
> And what about stroing the database onto a Solid state disk or on a Raid 
> 6 array normal HD....

See earlier point about writing some test code typical of your
application.  There will be variations due to your average record size,
database page and cache size, size of various caches, how the operating
system prioritizes memory for caching vs applications, what filesystem
you using, how things behave if the disk starts getting full etc.  With
so many variables only your own test code will give you reasonably
accurate answers.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkouCCEACgkQmOOfHg372QTF4QCgqpQWqnv40icp8M/YSLB1uXNA
98UAn3ao8fY1/ViVSfSzSdGZmlbSu9yn
=fo7a
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to