On 30 May 2013, at 6:32am, Sunki Cheon <hanbit2...@gmail.com> wrote:

> Sqlite3 site says users can fix the configuration, like *scratch memory
> size, shared_memory, page cache size* etc, by using Sqlite3
> API(sqlite3_config). But I'm not familiar with using sqlite and dbt2(I'm
> doing my school project with dbt2 benchmark on sqlite).

For those playing along at home,

<http://www.sqlite.org/c3ref/config.html>
<http://www.sqlite.org/c3ref/c_config_covering_index_scan.html>

(not sure why the second page has that URL).

> Before installing sqlite

SQLite does not have any 'installation'.  It is not memory resident.  There's 
no database server.  The calls which consult and change your files are called 
straight from your application and execute inside your application.

> we first execute configure file. I think we can
> change some configuration by modifying source file and doing ./configure OR
> doing ./configure with some options. Is it right?

You can modify the SQLite source code if you want, and change the defaults in 
that, but they're spread out in various places and you'd have to read the 
documentation carefully.

> Or should I have to go to dbt2 source code and find where the dbt2 execute
> the sqlite function or configuration?

The sqlite3_config() interface allwows you to change these settings by making 
your own calls from software written in C.  So assuming your benchmark software 
is written in C you would probably find where the benchmark has its 
sqlite3_initialize() command and put one or more sqlite3_config() commands in 
just before that.  Please check the values returned to be sure that SQLite has 
correctly processed your requests for changes.

> Or should I have to detect the default values some where in the sqlite
> source code and change that?

Unless you are willing to dive into SQLite's source code and learn things that 
would be useful only for very picky uses of SQLite I would not recommend you do 
this.  For most uses of SQLite, sqlite3_config() does it better.

While we're here I just wanted to mention that SQLite is pretty good at picking 
its own default settings.  It's not just one-size-fits all, it choses different 
settings depending on several things it finds out about how your storage system 
works and some aspects of your operating system.  So in your benchmarking 
please try the default settings as well as trying to come up with better 
settings of your own.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to