Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Jaco Breitenbach
On 19 September 2011 19:25, Simon Slavin wrote: > > On 19 Sep 2011, at 7:13pm, Jaco Breitenbach wrote: > > > While on the topic of performance, I've performed a test in which new > tables > > were created within an active transaction (manual 'partitioning') and > > populated within the same trans

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Simon Slavin
On 19 Sep 2011, at 7:13pm, Jaco Breitenbach wrote: > While on the topic of performance, I've performed a test in which new tables > were created within an active transaction (manual 'partitioning') and > populated within the same transaction. What I've found, was that as the > number of tables c

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Jaco Breitenbach
Hi Christian, Thanks for your response. On 19 September 2011 16:45, Christian Smith wrote: > On Mon, Sep 19, 2011 at 02:42:42PM +0100, Jaco Breitenbach wrote: > > Hi Simon, > > > > Thanks for the reply. > > > > On 19 September 2011 13:23, Simon Slavin wrote: > > > > > > I run the database (3.7

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Christian Smith
On Mon, Sep 19, 2011 at 02:42:42PM +0100, Jaco Breitenbach wrote: > Hi Simon, > > Thanks for the reply. > > On 19 September 2011 13:23, Simon Slavin wrote: > > > > I run the database (3.7.7.1) in WAL mode, with checkpointing performed at > > 10 > > > minute intervals. > > > > You turned 'PRAGMA

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Simon Slavin
On 19 Sep 2011, at 3:16pm, Jaco Breitenbach wrote: > I have to apologize: I had the PRAGMA options confused. My application > makes exclusive use of PRAGMA journal_mode=WAL. > > What I meant to say was that the WAL log file is never truncated, except for > it being removed when the database co

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Jaco Breitenbach
I have to apologize: I had the PRAGMA options confused. My application makes exclusive use of PRAGMA journal_mode=WAL. What I meant to say was that the WAL log file is never truncated, except for it being removed when the database connection is closed successfully. On 19 September 2011 15:02, S

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Simon Slavin
On 19 Sep 2011, at 2:42pm, Jaco Breitenbach wrote: > On 19 September 2011 13:23, Simon Slavin wrote: > >> If you're actually concerned about filesize, then WAL mode is probably not >> the right mode to use. You may be better off with 'PRAGMA journal_mode = >> DELETE'. If your platform stores

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Jaco Breitenbach
Hi Simon, Thanks for the reply. On 19 September 2011 13:23, Simon Slavin wrote: > On 19 Sep 2011, at 10:13am, Jaco Breitenbach wrote: > > > CREATE TABLE T ( K varchar(22) PRIMARY KEY ); > > Note that SQLite doesn't really do 'varchar'. All text fields are text > fields and can have an

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Simon Slavin
On 19 Sep 2011, at 10:13am, Jaco Breitenbach wrote: > CREATE TABLE T ( K varchar(22) PRIMARY KEY ); Note that SQLite doesn't really do 'varchar'. All text fields are text fields and can have any number of characters in. You can choose to put 22 character in each entry, but you might

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Stephan Beal
On Mon, Sep 19, 2011 at 11:13 AM, Jaco Breitenbach wrote: > In the case of the data file, since my record is only 22 bytes wide, am I > correct in assuming that the extra 48 bytes are for the index? > Don't forget that the on-storage data structures require their own information, e.g. links betwe

[sqlite] SQLite disc and I/O usage

2011-09-19 Thread Jaco Breitenbach
Dear experts, I am creating a (simple) model of the disc and I/O usage of my SQLite database so I can advise my customers on hardware requirements. My database schema is very simple. It contains only one table with a single column with a primary key: CREATE TABLE T ( K varchar(22) PRIMAR