Re: [sqlite] Is it possible to optimize the read performanceof a C++ app using sqlite pragma journal_mode = wal & pragma

2011-05-26 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/26/2011 10:41 PM, Frank Chang wrote: > > Roger Binns, Thank you for your reply. You never answered the important bit - is your concern about initial population of the database or about runtime later on. > Would you expect us to get faster

Re: [sqlite] Is it possible to optimize the read performanceof a C++ app using sqlite pragma journal_mode = wal & pragma

2011-05-26 Thread Frank Chang
Roger Binns, Thank you for your reply. I understand what you are saying that we should drop the sqlite3_wal_checkpoint_v2(Database,"main",SQLITE_CHECKPOINT_FULL, // &number1,&number2); after the commit transaction ReturnValue=sqlite3_prepare(Database,"COMMIT",-1,&Statement,0); status = sql

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread BareFeetWare
On 27/05/2011, at 10:42 AM, Simon Slavin wrote: > Tom, John ran across two common problems with SQLite and Xcode: > > A) Xcode seems to want to interpret .c and .h files as C++ instead of C. > B) Confusion common to people who normally program for Windows or non-Open > systems about what combina

Re: [sqlite] Is it possible to optimize the read performanceof a C++ app using sqlite pragma journal_mode = wal & pragmawal_checkpoint?

2011-05-26 Thread Jean-Christophe Deschamps
> Simon Slavin, Thank you for your suggestion. Our deduper prototoype > uses fuzzy matching methods such as the Levenshtein Distance to > detect duplicates. We have found that these fuzzy matching methods > are best implemented in C++ for processing time requirements. > We would

Re: [sqlite] Is it possible to optimize the read performanceof a C++ app using sqlite pragma journal_mode = wal & pragmawal_checkpoint?

2011-05-26 Thread Simon Slavin
On 27 May 2011, at 2:05am, Frank Chang wrote: > Simon Slavin, Thank you for your suggestion. Our deduper prototoype uses > fuzzy matching methods such as the Levenshtein Distance to detect duplicates. > We have found that these fuzzy matching methods are best implemented in C++ > for processin

Re: [sqlite] Is it possible to optimize the read performanceof a C++ app using sqlite pragma journal_mode = wal & pragmawal_checkpoint?

2011-05-26 Thread Frank Chang
Simon Slavin, Thank you for your suggestion. Our deduper prototoype uses fuzzy matching methods such as the Levenshtein Distance to detect duplicates. We have found that these fuzzy matching methods are best implemented in C++ for processing time requirements. We would still like

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Simon Slavin
On 27 May 2011, at 1:35am, BareFeetWare wrote: > Here's a simple answer: Tom, John ran across two common problems with SQLite and Xcode: A) Xcode seems to want to interpret .c and .h files as C++ instead of C. B) Confusion common to people who normally program for Windows or non-Open systems a

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread BareFeetWare
On 27/05/2011, at 12:49 AM, john darnell wrote: > I am still trying to get SQLite to work on my Mac. I want to make sure I am > doing what I should be doing. Here's a simple answer: 1. Add the sqlite library to your target's build phase. 2. Add an Objective C wrapper class to your project, su

Re: [sqlite] [BUG] Silent change in intergeral overflow handling in 3.7.6

2011-05-26 Thread Richard Hipp
On Wed, May 25, 2011 at 4:40 AM, Jan Hudec wrote: > I need condition > >object_id = side_id & ~(1 << 63) > > but that's not valid syntax. > Yeah it is. Try, for example: SELECT 1234 & ~(1<<63); SELECT (-1234) & ~(1<<63); -- D. Richard Hipp d...@sqlite.org __

Re: [sqlite] using a view for fts

2011-05-26 Thread Nico Williams
Use AS to ensure that views'columns get useful column names. Nico -- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Simon Slavin
On 26 May 2011, at 9:56pm, john darnell wrote: > One final message on this topic. In my last message I mentioned four > warnings remaining when I compile the file. I decided to at least look at > them in situ and see what they were. It turned out that it took very little > to fix them AFAIK

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
One final message on this topic. In my last message I mentioned four warnings remaining when I compile the file. I decided to at least look at them in situ and see what they were. It turned out that it took very little to fix them AFAIK. Here is what I did: > > Warning: declaration of fs

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
Thank you Mr. Slavin. I checked as you suggest and there were no other options listed in the dropdown. However, with the help of my good friend and colleague Mark Woodring I think we found what we needed to change. First, under the Project info dialog, under the Build tab, under Language, t

[sqlite] using a view for fts

2011-05-26 Thread Mr. Puneet Kishor
Consider CREATE VIRTUAL TABLE fts_text USING fts4 (id, content); .. populate the above table, then .. SELECT rowid, Snippet(fts_text) FROM fts_text WHERE fts_text MATCH ?; If I try to do something like CREATE VIEW v_find AS SELECT rowid, Snippet(fts_text) content FROM fts_text; SELECT row

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Simon Slavin
On 26 May 2011, at 8:12pm, john darnell wrote: > Thank you Mr. Ivanov. I can buy what you are saying 100%. What I need to > know is how to tell Xcode to compile that file as a C file if the standard > procedure is not working. > I recoup: the files are being classified as sourcecode.c.c and

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
Thank you Mr. Ivanov. I can buy what you are saying 100%. What I need to know is how to tell Xcode to compile that file as a C file if the standard procedure is not working. I recoup: the files are being classified as sourcecode.c.c and sourcecode.c.h. What else do I need to do? R, John >

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Pavel Ivanov
> Here are two errors out of the 1200+ errors generated (I tried to include as > much information as possible to help identify the problem.  Please forgive if > I am overdoing it...): > >        Compiling /.../sqlite3.c >        Error:invalid conversion from "void *" to "char *" >        This err

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
> > I'm not sure what .dylib you're using. The standard installation of OS X > with the > Developer tools has sqlite header files in > > /usr/include/sqlite3.h > > and > > /Developer/SDKs/MacOSX10.6.sdk/usr/include/sqlite3.h > > which may or may not be identical to each-other. > > Whereve

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Simon Slavin
On 26 May 2011, at 7:38pm, john darnell wrote: > However, I am intrigued by your remark that I should be using the header file > that comes with the .dylib. I had been using the header that came with the > amalgamation. Where can I find the header that should be used with the > .dylib? I'm n

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Simon Slavin > Sent: Thursday, May 26, 2011 12:38 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite in Xcode > One thing that occurs to me is

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Simon Slavin
On 26 May 2011, at 5:35pm, john darnell wrote: >> Make sure sqlite3.c is 'ticked' next to 'Target Membership' for your product >> file. > > I am not someone who uses Xcode frequently--I usually develop on Windows and > port t the Mac, but if by "Target Membership" you mean the last column in t

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
Mr. Slavin, here's the information you requested: Please note that I am working in Xcode 3.1.3. That may or may not be part/all of the problem. > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Simon Slavin > Sent: Thurs

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Jean-Denis Muys
On 26 mai 2011, at 17:23, john darnell wrote: On 26 mai 2011, at 16:49, john darnell wrote: Since then I have tried using the sqlite.dylib file that comes with OSX but in doing so, some important SQLite functions (such as the prepare function) were not found during the link process. This shoul

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Jean-Denis Muys > Sent: Thursday, May 26, 2011 10:08 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite in Xcode > > > On 26 mai 2011, at 16:49

Re: [sqlite] [BUG] Silent change in intergeral overflow handling in 3.7.6

2011-05-26 Thread Doug Currie
On May 26, 2011, at 2:54 AM, Jan Hudec wrote: > Gotcha! No, it's not. -1-x is equivalent, but -x-1 is not: > >sqlite> select -1-(1<<63), -(1<<63)-1; >9223372036854775807|9.22337203685478e+18 > > Besides my point was not that it's not possible, but that it would > be more readable with de

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Simon Slavin
On 26 May 2011, at 3:49pm, john darnell wrote: > I am still trying to get SQLite to work on my Mac. I want to make sure I am > doing what I should be doing. Here are the steps I have taken: > > 1.) I downloaded and uncompressed sqlite-autoconf-3070602.tar.gz from > the SQLite download p

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Jean-Denis Muys
On 26 mai 2011, at 16:49, john darnell wrote: > Hello everyone. > > I am still trying to get SQLite to work on my Mac. I want to make sure I am > doing what I should be doing. Here are the steps I have taken: > > 1.) I downloaded and uncompressed sqlite-autoconf-3070602.tar.gz from > t

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread Pavel Ivanov
> 2.)     I moved SQLite3.c and SQLite3.h into my source folder and added them > to the project.  I made no changes to the code nor did I do anything special > when I added them to my project (i.e. I did not set any special compile > flags-I simply added the two files to the project). > 3.)    

[sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
Hello everyone. I am still trying to get SQLite to work on my Mac. I want to make sure I am doing what I should be doing. Here are the steps I have taken: 1.) I downloaded and uncompressed sqlite-autoconf-3070602.tar.gz from the SQLite download page. 2.) I moved SQLite3.c and SQLite3