Re: [sqlite] C code spanish character insert problem

2009-09-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bible Trivia Extreme wrote: > (loop over spanish .txt file here while inserting) > sprintf(query, "INSERT INTO questions VALUES('%s', '%s')", question, > answer); That is a *really* bad way of doing things, both from a performance point of view and

Re: [sqlite] C code spanish character insert problem

2009-09-29 Thread Dan Bishop
Bible Trivia Extreme wrote: >> Open your spanish.txt file in a hex editor. The letter 'ñ' should be >> encoded as C3 B1. If you see F1 instead, it means your file is in >> >> > ISO-8859-1 or something similar.Thanks Dan, it seems to be F1. So what do I > do exactly? > > Im assuming I need

Re: [sqlite] Inconsistency in mutex.h and mutex.c

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 5:29 AM, Schrum, Allan wrote: > At the bottom of mutex.h there is an: > > #ifdef SQLITE_MUTEX_OMIT > ... > #endif /* defined(SQLITE_OMIT_MUTEX) > > Either the comments or the define should be changed. This occurs in > mutex.c as well. > > The pattern for all other "OMIT"

Re: [sqlite] C code spanish character insert problem

2009-09-29 Thread Bible Trivia Extreme
Open your spanish.txt file in a hex editor. The letter 'ñ' should be > encoded as C3 B1. If you see F1 instead, it means your file is in > ISO-8859-1 or something similar. > ___ > > Thanks Dan, it seems to be F1. So what do I do exactly? Im assuming

Re: [sqlite] C code spanish character insert problem

2009-09-29 Thread Dan Bishop
Bible Trivia Extreme wrote: > On Tue, Sep 29, 2009 at 9:48 PM, Simon Slavin > wrote: > > >> On 30 Sep 2009, at 2:25am, Bible Trivia Extreme wrote: >> >> >>> Is there something special I need to do in the C/Sqlite >>> code to make this work properly? >>>

Re: [sqlite] C code spanish character insert problem

2009-09-29 Thread Bible Trivia Extreme
On Tue, Sep 29, 2009 at 9:48 PM, Simon Slavin wrote: > > On 30 Sep 2009, at 2:25am, Bible Trivia Extreme wrote: > > > Is there something special I need to do in the C/Sqlite > > code to make this work properly? > > Which SQLite function calls are you using to run your

Re: [sqlite] C code spanish character insert problem

2009-09-29 Thread Igor Tandetnik
Bible Trivia Extreme wrote: > Im trying to figure out why I cannot get spanish characters > into my sqlite DB properly. Start here: http://www.joelonsoftware.com/articles/Unicode.html Igor Tandetnik ___ sqlite-users mailing list

Re: [sqlite] multiple prepare statements

2009-09-29 Thread Igor Tandetnik
Sam Carleton wrote: > Is it possible to have two different prepare statements at one time Yes. As many as you need. Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Phoronix SQLite benchmark Improvements - [was Re: SQLite behaviour on FreeBSD and KVM]

2009-09-29 Thread Matthew Tippett
Relabling to provide focus on this thread the KVM/FreeBSD specific issues - I'll deal with that the main thread. So, if I could put forward to you a few suggestions. 1) Review the existing tests (which you have done somewhat already) 2) Define a clear and relevant intent for benchmarking

Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-09-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matthew Tippett wrote: > I would like to highlight the following SQLite benchmark results posted > by Phoronix via Phoronix Test Suite (http://www.phoronix-test-suite.com/) An earlier test showed massive differences for Linux filesystems but those

[sqlite] C code spanish character insert problem

2009-09-29 Thread Bible Trivia Extreme
Hello- Im trying to figure out why I cannot get spanish characters into my sqlite DB properly. Im using a C program to read a text file that is already translated into spanish. When I look at this file the spanish characters (tilde n, acentos etc) are correct. When I run the C program and open

Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-09-29 Thread Simon Slavin
On 29 Sep 2009, at 10:29pm, Matthew Tippett wrote: > If there is anyone who is interested in assisting in improving the > quality/value/functional interest of the benchmarks, then please > advise. In SQLite, when you know you are making many changes and don't need to consult the data until

Re: [sqlite] Compiler warnings with Sun Studio 12.1 on Solaris 10

2009-09-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nicolas Williams wrote: > On Tue, Sep 29, 2009 at 11:21:30AM -0700, Roger Binns wrote: >> Nicolas Williams wrote: >>> If you move the cast to the left the warning should go away: >>> ((sqlite3_int64)(1L<<63)) >> And this is why making warnings go

[sqlite] Inconsistency in mutex.h and mutex.c

2009-09-29 Thread Schrum, Allan
At the bottom of mutex.h there is an: #ifdef SQLITE_MUTEX_OMIT ... #endif /* defined(SQLITE_OMIT_MUTEX) Either the comments or the define should be changed. This occurs in mutex.c as well. The pattern for all other "OMIT" definitions is SQLITE_OMIT_% so it would be nice if this one could be

Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-09-29 Thread Matthew Tippett
If there is anyone who is interested in assisting in improving the quality/value/functional interest of the benchmarks, then please advise. PTS can handle direct numerical, average or gemetric means at individual test case or aggregate test suites. Regards... Matthew On 9/29/09, Simon Slavin

Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-09-29 Thread Pavel Ivanov
> I cannot find any sign of BEGIN;COMMIT; . And as a result of that, Matthew, you're right, on OS (or OS + file system) where fsync() doesn't do physical write test getting huge boost in performance. Just take the second test: 12,500 transactions in 771.13 seconds giving about 16 transactions per

Re: [sqlite] SQLite behaviour on FreeBSD and KVM

2009-09-29 Thread Simon Slavin
On 29 Sep 2009, at 8:57pm, Matthew Tippett wrote: > In particular > http://www.phoronix.com/scan.php?page=article=linux_2631_kvm=3 > http://www.phoronix.com/scan.php?page=article=freebsd8_ubuntu910=7 > > In both of these cases, there are configurations where there is an > order > of

Re: [sqlite] Use of .TIMER within sqlite3 commandline utility: wasRE: sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Simon Slavin
On 29 Sep 2009, at 8:22pm, Wilson, Ronald wrote: >> The .timer command is only available on unix and unix-like platforms >> at present. Not on win32. > > D'Oh! Ah. Okay, I have it because I'm using a Mac. The OP must be running Windows. Simon.

[sqlite] SQLite behaviour on FreeBSD and KVM

2009-09-29 Thread Matthew Tippett
Hi, I would like to highlight the following SQLite benchmark results posted by Phoronix via Phoronix Test Suite (http://www.phoronix-test-suite.com/) In particular http://www.phoronix.com/scan.php?page=article=linux_2631_kvm=3

Re: [sqlite] Compiler warnings with Sun Studio 12.1 on Solaris 10

2009-09-29 Thread Nicolas Williams
On Tue, Sep 29, 2009 at 12:05:21PM -0700, Jim Showalter wrote: > Warnings are never harmless--they clutter the build output and > introduce cognitive dissonance when trying to see if a build is clean > or not. > > I worked on a project where they hadn't enabled warnings during > development

Re: [sqlite] Use of .TIMER within sqlite3 commandline utility: wasRE: sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Wilson, Ronald
> The .timer command is only available on unix and unix-like platforms > at present. Not on win32. D'Oh! Ron Wilson, Engineering Project Lead (o) 434.455.6453, (m) 434.851.1612, www.harris.com HARRIS CORPORATION | RF Communications Division assuredcommunications(tm)

Re: [sqlite] Compiler warnings with Sun Studio 12.1 on Solaris 10

2009-09-29 Thread Nicolas Williams
On Tue, Sep 29, 2009 at 11:21:30AM -0700, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Nicolas Williams wrote: > > If you move the cast to the left the warning should go away: > > ((sqlite3_int64)(1L<<63)) > > And this is why making warnings go away leads to bugs.

Re: [sqlite] sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Wilson, Ronald
> sqlite> .timer on > sqlite> select 1; > 1 > CPU Time: user 0.000295 sys 0.000269 > sqlite> What version are you using? RW Ron Wilson, Engineering Project Lead (o) 434.455.6453, (m) 434.851.1612, www.harris.com HARRIS CORPORATION | RF Communications Division assuredcommunications(tm)

Re: [sqlite] Use of .TIMER within sqlite3 commandline utility: was RE: sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 1:41 AM, Griggs, Donald wrote: > > > I believe one must enable the .TIMER option when compiling > sqlite3. I > think the pre-compiled versions have this disabled by default (at > least > for the Windows binaries). The .timer command is only available on unix and

Re: [sqlite] Compiler warnings with Sun Studio 12.1 on Solaris 10

2009-09-29 Thread D. Richard Hipp
On Sep 29, 2009, at 2:21 PM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Nicolas Williams wrote: >> If you move the cast to the left the warning should go away: >> ((sqlite3_int64)(1L<<63)) > > And this is why making warnings go away leads to bugs. The >

[sqlite] Use of .TIMER within sqlite3 commandline utility: was RE: sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Griggs, Donald
I believe one must enable the .TIMER option when compiling sqlite3. I think the pre-compiled versions have this disabled by default (at least for the Windows binaries). Donald ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Petite Abeille
On Sep 29, 2009, at 7:19 PM, Wilson, Ronald wrote: > I can't find the .timer feature in the SQLite command line utility. sqlite> .timer on sqlite> select 1; 1 CPU Time: user 0.000295 sys 0.000269 sqlite> ___ sqlite-users mailing list

Re: [sqlite] Comparing two tables?

2009-09-29 Thread Petite Abeille
On Sep 29, 2009, at 6:50 PM, Cory Nelson wrote: > i believe he means except, not minus. Correct. Got my SQL dialects intermingled :) > If all you need is differing > rows, this will work like a charm. Otherwise if you need a more > fine-grained delta like only returning columns that changed,

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Dan Kennedy
On Sep 30, 2009, at 1:09 AM, Ralf Junker wrote: > At 14:04 29.09.2009, Dan Kennedy wrote: > >> On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: >> >>> My memory manager reports that the SQL below results in memory being >>> reused after it has already been freed when it is RUN FOR A SECOND >>>

Re: [sqlite] Compiler warnings with Sun Studio 12.1 on Solaris 10

2009-09-29 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nicolas Williams wrote: > If you move the cast to the left the warning should go away: > ((sqlite3_int64)(1L<<63)) And this is why making warnings go away leads to bugs. The replacement above will only work if sizeof(long)==sizeof(long long) which

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Ralf Junker
At 14:04 29.09.2009, Dan Kennedy wrote: >On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: > >> My memory manager reports that the SQL below results in memory being >> reused after it has already been freed when it is RUN FOR A SECOND >> TIME on the same database connection. > >Hi Ralf, >

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Ralf Junker
At 14:04 29.09.2009, Dan Kennedy wrote: >On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: > >> My memory manager reports that the SQL below results in memory being >> reused after it has already been freed when it is RUN FOR A SECOND >> TIME on the same database connection. > >Hi Ralf, >

Re: [sqlite] sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Wilson, Ronald
> Huh. Do a .help in that version. Should be there. See > > > > Simon. I tried it in 3.6.10 and went, "huh" as well. So I upgraded to the latest (3.6.18) and still no .timer command. RW Ron Wilson, Engineering Project Lead (o) 434.455.6453, (m)

Re: [sqlite] sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Wilson, Ronald
> That's a good start. Don't forget iostat. On top of that, > Simon Slavin already told you how to measure time taken in > SQLite with the .timer ON command. I can't find the .timer feature in the SQLite command line utility. SQLite version 3.6.18 Enter ".help" for instructions Enter SQL

[sqlite] Feature Request Discussion: Virtual Table Column Use identification

2009-09-29 Thread Schrum, Allan
Hi Folks, I need to know what columns of my virtual table implementation are used for a particular query or not. The computation of the columns is expensive and cannot be deferred until the call to xColumn(). Thus I need to know before the first row is fetched so that I can be efficient in my

Re: [sqlite] Comparing two tables?

2009-09-29 Thread Cory Nelson
On Tue, Sep 29, 2009 at 9:38 AM, Petite Abeille wrote: > > On Sep 29, 2009, at 6:32 PM, Joe Bennett wrote: > >> Have two tables structured exactly the same. Want to compare both of >> them and get the delta. Been Googling for about an hour now and I see >> tools that do

Re: [sqlite] sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Simon Slavin
On 29 Sep 2009, at 5:11pm, oryann9 wrote: > I did do this, set-up a cron job using vmstat, free and top. Great tools. Don't forget that 'top' is a way into the information 'ps' shows. You might find that 'ps' shows you more useful information. Or you might not. > I do not know how to

Re: [sqlite] Comparing two tables?

2009-09-29 Thread Adam DeVita
Good day, Are you looking to simply identify records that are different (not missing from the tables) or identify records with ANY field different and get the result? Is there a primary key? Posting the structure would be helpful. This should not be hard. C:\Documents and

Re: [sqlite] Comparing two tables?

2009-09-29 Thread Joe Bennett
Figuratively I'm looking to take a row in table A, find it in table B and compare the values in each column... If there is a delta, let me know What I am trying to do is take an old table and compare it to the new one and show the changes... -Joe On Tue, Sep 29, 2009 at 12:37 PM,

Re: [sqlite] sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread Kees Nuyt
[quoting fixed] On Tue, 29 Sep 2009 09:11:52 -0700 (PDT), oryann9 wrote: > Kees Nuyt wrote: >> >> oryann9 wrote: >>>Is there a method, set of tools to gather and show >>>either graphically or non-graphically the performance >>>of SQLite3 databases? >>>I

Re: [sqlite] Comparing two tables?

2009-09-29 Thread bartsmissaert
What is the delta? RBS > Hi, > > > Have two tables structured exactly the same. Want to compare both of > them and get the delta. Been Googling for about an hour now and I see > tools that do this (maybe a freeware one I haven't found?) and was > looking for a solution that more meets the

[sqlite] Comparing two tables?

2009-09-29 Thread Joe Bennett
Hi, Have two tables structured exactly the same. Want to compare both of them and get the delta. Been Googling for about an hour now and I see tools that do this (maybe a freeware one I haven't found?) and was looking for a solution that more meets the budget I was given for this project,

Re: [sqlite] Comparing two tables?

2009-09-29 Thread Petite Abeille
On Sep 29, 2009, at 6:32 PM, Joe Bennett wrote: > Have two tables structured exactly the same. Want to compare both of > them and get the delta. Been Googling for about an hour now and I see > tools that do this (maybe a freeware one I haven't found?) and was > looking for a solution that more

Re: [sqlite] sqlite-users Digest, Vol 21, Issue 122

2009-09-29 Thread oryann9
>Is there a method, set of tools to gather and show >either graphically or non-graphically the performance >of SQLite3 databases? >I am trying to determine the current memory, disk IO >and cpu load all DB transactions place on our server. Set up a suite of benchmark queries and use the

Re: [sqlite] How to use sqlite3_exec() to execute SQL command with Unicode text?

2009-09-29 Thread Kees Nuyt
On Tue, 29 Sep 2009 07:07:54 -0700 (PDT), bigboss97 wrote: > >My program is using sqlite3_exec() to run SQL command which has the type of >char*. Now I want to allow unicode in my DB. What do I have to change? >Obviously, sqlite3_exec() won't work any more. > >Phuoc

[sqlite] How to use sqlite3_exec() to execute SQL command with Unicode text?

2009-09-29 Thread bigboss97
My program is using sqlite3_exec() to run SQL command which has the type of char*. Now I want to allow unicode in my DB. What do I have to change? Obviously, sqlite3_exec() won't work any more. Phuoc - www.folksfun.com -- View this message

Re: [sqlite] Data storage : Boolean and Date

2009-09-29 Thread Romain Perney
ime) or a traditional Unix time (the number of seconds since midnight 1/1/1970). If you don't need to manipulate these fields in your SQL, then you can choose any format you want. E.g. in my application I find it convenient to store dates as integers like 20090929 (I don't need times). >/ - to store b

Re: [sqlite] Faster inserts in SQlite ...

2009-09-29 Thread Atul_Vaidya
Hi Nicolas, My application is windows based. I did set the pragma Page Size = 4096 as suggested by Alexey. but, it hardy made any difference to the speed. I am abandoning the multi-threading idea, as the other components used in my application aren't thread safe. Also, i was

Re: [sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Dan Kennedy
On Sep 29, 2009, at 4:30 PM, Ralf Junker wrote: > My memory manager reports that the SQL below results in memory being > reused after it has already been freed when it is RUN FOR A SECOND > TIME on the same database connection. Hi Ralf, Thanks for this report. I'm unable to reproduce the

Re: [sqlite] Data storage : Boolean and Date

2009-09-29 Thread Igor Tandetnik
t 1/1/1970). If you don't need to manipulate these fields in your SQL, then you can choose any format you want. E.g. in my application I find it convenient to store dates as integers like 20090929 (I don't need times). > - to store boolean values? As integer 0 or 1. Igor Tan

Re: [sqlite] Compiler warnings with Sun Studio 12.1 on Solaris 10

2009-09-29 Thread D. Richard Hipp
On Sep 27, 2009, at 5:28 PM, Dr. David Kirkby wrote: > "sqlite3.c", line 18731: warning: integer overflow detected: op "<<" > "sqlite3.c", line 18748: warning: integer overflow detected: op "<<" Both cases are complaining about a constant: (0x1f<<28)Both are harmless. > "sqlite3.c",

Re: [sqlite] performance trending

2009-09-29 Thread Kees Nuyt
On Mon, 28 Sep 2009 19:07:05 -0700 (PDT), oryann9 wrote: >Is there a method, set of tools to gather and show >either graphically or non-graphically the performance >of SQLite3 databases? >I am trying to determine the current memory, disk IO >and cpu load all DB transactions

[sqlite] Bug report: Memory reused after freed

2009-09-29 Thread Ralf Junker
My memory manager reports that the SQL below results in memory being reused after it has already been freed when it is RUN FOR A SECOND TIME on the same database connection. Psydocode (I do not run C): sqlite3_initialize; sqlite3_open(DB_FILE_NAME, ); sqlite3_exec(DB, SQL, NULL, NULL,

[sqlite] Data storage : Boolean and Date

2009-09-29 Thread Romain Perney
Hi all, I'm new to the list, and I can't find any archive to look trough... My questions was : - what is the best way to store date-time values with sqlite3? - to store boolean values? I assume INTEGER is the solution, but I wanted to know if there was some convention about that... Thanks for