Re: [sqlite] How to set memory usage as high as possible -- but not too high?

2008-04-13 Thread Dan
On Apr 14, 2008, at 5:53 AM, Ralf Junker wrote: > I need to create a huge database (about 6 GB, more than 6 mio > records, blobs, and FTS text) in as little time as possible. Since > memory is the key to speed, I try to use as much memory as is > available. However, there is the danger of

Re: [sqlite] How to set memory usage as high as possible -- but not too high?

2008-04-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ralf Junker wrote: > I need to create a huge database (about 6 GB, more than 6 mio records, blobs, > and FTS text) in as little time as possible. Since memory is the key to > speed, I try to use as much memory as is available. However, there is the

[sqlite] How to set memory usage as high as possible -- but not too high?

2008-04-13 Thread Ralf Junker
I need to create a huge database (about 6 GB, more than 6 mio records, blobs, and FTS text) in as little time as possible. Since memory is the key to speed, I try to use as much memory as is available. However, there is the danger of running out of memory. This is where memory usage control

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread John Stanton
The solution I mentioned earlier stores decimal numbers in display format. Right justified, leading spaces and embedded decimal point. The arithmetic functions handle the fixed point logic. The effect is the same as using a desktop calculator. Rounding is performed using the traditional

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread John Stanton
Our solution for the large number problem and escape the floating point jungle was to implement a display format fixed point decimal arithmetic processor with an arbitrary precision. It has add, subtract, multiply and divide plus aggregate functions. A wrapper handles the interface and

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Rich Shepard
On Sun, 13 Apr 2008, Rich Shepard wrote: > approach (less elegant but workable) is to add 0.05 to all values with two Oops! Make that 0.005. Mea culpa! Rich -- Richard B. Shepard, Ph.D. | Integrity

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Rich Shepard
On Sun, 13 Apr 2008, Aladdin Lampé wrote: Thank you Nicolas for your answer. I understand that an int64 certainly gives me enough precision in the general case. Now what am I supposed to do if the user decides to add a virtual 4 decimal digits number to another number which has only 2 decimal

Re: [sqlite] segmentation fault

2008-04-13 Thread Ken
HINT: se a debugger: for (i=0;i for (i=0;i<=dim;i++) str2[i] = toupper(str2[i]); str2 is never initialized and hence the assignment above is probably the issue dark0s dark0s <[EMAIL PROTECTED]> wrote: This is last suggestion that I tell, where is the problem now for segmentation

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Tomas Lee
On 2008 April 13 (Sun) 12:43:22pm PDT, Aladdin Lamp? <[EMAIL PROTECTED]> wrote: > Thank you Nicolas for your answer. I understand that an int64 > certainly gives me enough precision in the general case. > > Now what am I supposed to do if the user decides to add a virtual 4 > decimal digits number

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Aladdin Lampé
Thank you Nicolas for your answer. I understand that an int64 certainly gives me enough precision in the general case. Now what am I supposed to do if the user decides to add a virtual 4 decimal digits number to another number which has only 2 decimal digits? I should first identify this and

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Nicolas Williams
On Sun, Apr 13, 2008 at 07:37:33PM +0200, Aladdin Lampé wrote: > In my opinion (please tell me if I'm wrong), your method only works if > you want to *display* the values in your column, and if the decimal > precision doesn't change form line to line. > > I would like to be able to perform

[sqlite] sqlite.kit (tcl starkit) for multiple platforms?

2008-04-13 Thread Lauri Ojansivu
Hi, is there called sqlite.kit (tcl starkit) for multiple platforms somewhere? There is link at sdarchive: http://tcl.tk/starkits/ - but when I click it, it says it's not found. I tried search for it with google but didn't find yet. ___ sqlite-users

[sqlite] segmentation fault

2008-04-13 Thread dark0s dark0s
I did not used never gdb. Can I post me commands that I must to use (gdb) run sqlite3 Starting program: sqlite3 No executable file specified. Use the "file" or "exec-file" command. (gdb) run select load_extension('/root/soundex.so'); Starting program: select load_extension('/root/soundex.so');

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Aladdin Lampé
In my opinion (please tell me if I'm wrong), your method only works if you want to *display* the values in your column, and if the decimal precision doesn't change form line to line. I would like to be able to perform operations (+, /, %, etc.) and to store intermediary results into other

Re: [sqlite] SQL Quick Review/Reference

2008-04-13 Thread Clay Dowling
Amit Uttamchandani wrote: >> I also purchased "Beginning Database Design - from Novice to >> Professional" by Clare Churcher, but found it to much of a beginners >> book for my needs. Let me recommend SQL For Smarties as an excellent starting point. The book is perfectly suitable for beginners,

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Dennis Cote
Why not just express all money values in terms of the smallest division of the currency? For example, for dollars, use cents, for pounds use pennies. Sqlite has up to 8 byte integers which would allow for all reasonable values. This is mostly a test of replying to a post from Yahoo mail, but

[sqlite] Comparison of SQLite applications for Mac

2008-04-13 Thread BareFeet
Hi all, I've put together a rough tabulated comparison of a few SQLite GUI applications for the Mac. It shows whether each shows an entity list, whether they facilitate data entry in tables and views, what sort of syntax coloring they offer, etc. Please let me know (on this forum

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread BareFeet
> Why not just express all money values in terms of the smallest > division of > the currency? For example, for dollars, use cents, for pounds use > pennies. Yes, and you can create views to show the amounts in decimal notation where you need to. I do this (store as integers, show

Re: [sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Geoff Lane
On Sun, Apr 13, 2008 at 06:13:04PM +0200, Aladdin Lampé wrote: > Maybe I could also implement my own floating point format, based for > instance on an int64 and a way to tell where the decimal point is. But in > this case I would need to reimplement addition, division, etc. to deal > with the

[sqlite] Dealing with monetary huge values in sqlite

2008-04-13 Thread Aladdin Lampé
Hi all! In the application I'm developing, I'm dealing with monetary values that may become *very* huge (but with few decimals), and I have the feeling that the sqlite representation of "REAL" numbers with 8 bytes doubles may not be enough in my case, and I may get overflows (which would

Re: [sqlite] segmentation fault

2008-04-13 Thread Virgilio Alexandre Fornazin
You must have to do a run inside gdb to get sqlite shell working then you can get your segfault -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dark0s dark0s Sent: domingo, 13 de abril de 2008 11:00 To: sqlite-users@sqlite.org Subject: [sqlite]

[sqlite] segmentation fault

2008-04-13 Thread dark0s dark0s
How must I interpret this output: bash-3.1# gcc -O0 -g -shared labsinf.c -o soundex.so bash-3.1# gdb sqlite3 GNU gdb 6.6 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of

Re: [sqlite] segmentation fault

2008-04-13 Thread Igor Tandetnik
"dark0s dark0s" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This is last suggestion that I tell, where is the problem now for > segmentation fault: A few threads back, I predicted precisely this outcome. Writing through uninitialized pointers tends to end up this way, you know.

Re: [sqlite] segmentation fault

2008-04-13 Thread Virgilio Alexandre Fornazin
gdb is your friend here. compile with: gcc -O0 -g -shared labsinf.c -o soundex.so then run sqlite with gdb gdb sqlite3 () gdb> run then you can get the backtrace of your exception -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dark0s dark0s

[sqlite] segmentation fault

2008-04-13 Thread dark0s dark0s
This is last suggestion that I tell, where is the problem now for segmentation fault: bash-3.1# gcc -shared labsinf.c -o soundex.so bash-3.1# sqlite3 SQLite version 3.5.7 Enter ".help" for instructions sqlite> select load_extension('/root/soundex.so'); sqlite> select soundex('saverio'); S010

Re: [sqlite] SQL error: no such function: and no such column:

2008-04-13 Thread Igor Tandetnik
"dark0s dark0s" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > bash-3.1# gcc -shared labsinf.c -o inf.so > bash-3.1# sqlite3 > SQLite version 3.5.7 > Enter ".help" for instructions > sqlite> select load_extension('/root/inf.so'); > sqlite> select inf(savio); > SQL error: no such

[sqlite] SQL error: no such function: and no such column:

2008-04-13 Thread dark0s dark0s
bash-3.1# gcc -shared labsinf.c -o inf.so bash-3.1# sqlite3 SQLite version 3.5.7 Enter ".help" for instructions sqlite> select load_extension('/root/inf.so'); sqlite> select inf(savio); SQL error: no such column: savio sqlite> select inf('savio'); SQL error: no such function: inf sqlite> I tell

Re: [sqlite] SQLITE_LOCKED behavior

2008-04-13 Thread D. Richard Hipp
On Apr 13, 2008, at 3:01 AM, Tomas Lee wrote: > On 2008 April 12 (Sat) 05:44:53pm PDT, Shawn Wilsher <[EMAIL PROTECTED] > > wrote: >> When using SQLite 3.5.4.1 (a special branch cut for Mozilla, based >> mostly off of 3.5.4 with some OS/2 fixes), I'm getting SQLITE_LOCKED >> returned

Re: [sqlite] SQLITE_LOCKED behavior

2008-04-13 Thread Tomas Lee
On 2008 April 12 (Sat) 05:44:53pm PDT, Shawn Wilsher <[EMAIL PROTECTED]> wrote: > When using SQLite 3.5.4.1 (a special branch cut for Mozilla, based > mostly off of 3.5.4 with some OS/2 fixes), I'm getting SQLITE_LOCKED > returned unexpectedly. The documentation seems to indicate that I > should