logo       

Re: numbers: msg#00163

db.sqlite.general

Subject: Re: numbers

--- In sqlite-F5Bj5G+ccuY@xxxxxxxxxxxxxxxx, "to0ni" <tgoedeme@xxxx> wrote:
> First of all, I am new to SQLite. So maybe my question is stupid...
>
> I try to construct a database used in a computer vision application,
> written in C++. The data I want to save consists only of numbers.
> Using SQLite, is it really necessary to convert those numbers every
> time to strings and back? I have the impression that way of doing is
> not really efficient... Maybe there is a way numbers (int, float)
can
> be saved directly in a SQLite database from within a C++ program?

SQLite saves all data as strings, whether you want it to or not :).
But it is still far more efficient than most other databases out
there. If you try out sqlite and it's too slow for you, most of the
optimizations to try first don't have anything to do with string
conversions:
- use BEGIN/END transaction around a seqence of separate sqlite calls.
- use PRAGMA cache_size to increase the number of pages kept in
memory.
- use PRAGMA synchronous to increase the speed of file I/O.

Ask the group if this isn't enough for you.

Jim Lyon


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise