On 10 Oct 2009, at 7:04pm, Roger Binns wrote:

> Ron Arts wrote:
>> So I am wondering if I can drop the glib Hash Tables, and
>> go sqlite all the way. But I'm afraid the process of
>> constructing SQL queries / parsing them by sqlite, and
>> interpreting the results in my app, multiple times per
>> event will be too slow.

Don't forget to use transactions, even for when you are just doing  
SELECTs without changing any data.

> That is pure guesswork.  You will only know by building a  
> representative
> benchmark using data substantially similar to what you expect on  
> machines
> similar to what you expect in real world usage of the code.  (ie  
> anyone
> else's benchmark data isn't too useful to you)
>
> Secondly have a look at virtual tables.  They will let you store  
> data in any
> way you deem fit while still being able to offer a SQL interface to  
> them.

Also, don't assume that holding your table in memory is faster than  
just using a normal disk file and letting your operating system do  
caching and swapping as appropriate.  If you have enough data in your  
entire database (data /including/ indexes) to force paging/swapping  
then this may actually be faster.

As Roger wrote, we can't guess much more without having an idea of the  
size of your database and what kind of SELECT commands you're doing.

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

Reply via email to