Re: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Emerson Clarke
Nicholas, Thanks again for your patience, i think were getting somewhere. As an aside, can i just say that i dont understand why concurrency is always such a point of confusion. I think it should be a basic assumption that when people talk about accessing api's and data structures in a multithr

Re: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Nicolas Williams
On Thu, Jan 04, 2007 at 12:50:01AM +, Emerson Clarke wrote: > My oppologies, your right that explanation had been given. OK. > But i didnt actually take it seriously, i guess i found it hard to > believe that it being the easier option was the only reason why this > limitation was in place.

Re: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Emerson Clarke
Nicholas, My oppologies, your right that explanation had been given. But i didnt actually take it seriously, i guess i found it hard to believe that it being the easier option was the only reason why this limitation was in place. If this is the case, then surely the fix is simple. Given that i

Re: [sqlite] calculate age

2007-01-03 Thread Jay Sprenkle
> LOL! You should look at a function to determine if a day is a holiday. > Talk about ugly! In some places you literally need to know the weather > and the phase of the moon! > > -- [EMAIL PROTECTED] ~/movie]$ pom The Moon is Waning Gibbous (100% of Full) [EMAIL PROTECTED] ~/movie]$ which pom /u

[sqlite] RE: cant sum rows

2007-01-03 Thread LoGi
yes, thank you very much for your help. its work now :) Downey, Shawn wrote: > > I think you created a column in table1 named "int" of type "id". > > Try: > > CREATE TABLE table2 (id int); > > Then sum() should work. > > Shawn M. Downey > MPR Associates > 10 Maxwell Drive, Suite 204 > Cli

AW: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Michael Ruck
Hi Emerson, I just hope you don't reinvent the wheel ;) I haven't yet had the need to index things the way you describe it. May be I should take that as one of my next pet projects to get a handle on this type of task. The problem as I see it is basically, that any way you design this: If the sto

Re: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Emerson Clarke
Michael, Thanks for the advice. During the indexing process i need to select and optionally insert records into a table so i cant ignore the outcomes. Basically the indexing process does compression, so for each document it inserts words into a table and looks up keys. Every word in the docume

Re: [sqlite] pragma read_uncommitted and threading

2007-01-03 Thread Ken
I respectfully disagree with the reader/writer concurrency based upon the test_server.c model. The server thread executes each request independently and serially. The requests may be intermingled but they are not concurrently executed. Maybe my definition of conccurency is different, A a

RE: [sqlite] cant sum rows

2007-01-03 Thread Downey, Shawn
I think you created a column in table1 named "int" of type "id". Try: CREATE TABLE table2 (id int); Then sum() should work. Shawn M. Downey MPR Associates 10 Maxwell Drive, Suite 204 Clifton Park, New York 12065 518-371-3983 x113 (work) 860-508-5015 (cell) -Original Message- From: LoG

[sqlite] cant sum rows

2007-01-03 Thread LoGi
I create table with this sql: CREATE TABLE table1 (int id); and fill with some randomize values I try this sql: SELECT SUM(id) FROM table1 to sum the table rows but its return error no such column: id i use the sqlite from a c++ code with this function sqlite3_get_table(); thanks. -- Vie

[sqlite] minor doc issue; all docs referenced/build _except_ "whentouse.html" ...

2007-01-03 Thread snowcrash+sqlite
after building docs, on the "docs.html" page, there's a reference to "whentouse.html", Appropriate Uses For SQLite when i click on it, it's a missing page. looking in mybuild dir, % ls doc/ arch.html datatype3.html oldnews.html arch2.gif

Re: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Nicolas Williams
On Tue, Jan 02, 2007 at 11:56:42PM +, Emerson Clarke wrote: > The single connection multiple thread alternative apparently has > problems with sqlite3_step being active on more than one thread at the > same moment, so cannot easily be used in a safe way. But it is by far > the fastest and simp

Re: [sqlite] 2.8.6 Documentation

2007-01-03 Thread Dennis Cote
Tim Keeler wrote: Is there a url or somewhere I can get the sqlite 2.8.6 syntax documentation? Tim, The documentation on the website is released along with the source for each version of sqlite. For version 2.8.6 you would need to download that source archive and build the documentation f

Re: [sqlite] odd indexing behavior

2007-01-03 Thread michael cuthbertson
Thanks for the response, Joe. Unfortunately, since I have no way of knowing a priori what the relative number of returned rows is (without doing another query), using the plus is not really a work-around, it is a "don't use indexes" rule. I can't just arbitrarily assign the "plus" mark. Also, no ot

Re: [sqlite] Re: [RESOLVED/PATCH] re: "Error: no such function: randstr" @ v3.3.8 on OSX

2007-01-03 Thread Dennis Cote
[EMAIL PROTECTED] wrote: yeah, yeah. ... Call me cranky if you want. It probably just makes some gee-whiz syntax checker tool stop complaining. Whatever... Richard, You do sound a little cranky. :-) Perhaps its just post holiday blues. Remember its supposed to be a *Happy* New Ye

Re: [sqlite] SQLite Corruption - Probably Related to auto-vacuum

2007-01-03 Thread drh
[EMAIL PROTECTED] wrote: > Check-in [3548] fixes a problem in the pager which can lead to > database corruption on a heavily loaded system running autovacuum. > I am continuing to analyze the problem in order to fully > characterize the circumstances under which database corruption > might occur.

AW: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Michael Ruck
Emerson, Now I understand your current implementation. You seemingly only partially split up the work in your code. I'd schedule the database operation and not wait on the outcome, but start on the next task. When the database finishes and has retrieved its result, schedule some work package on a

[sqlite] .mode html output with added tag brackets

2007-01-03 Thread
Hi all, Short question: I want to use SQLite's html output option to deliver query results as a series of HTML rows. But I also want to insert extra HTML tags in the output. How can this be done? Longer detail: I want to use SQLite's HTML savvy conversion of characters (eg an ampersand

Re: [sqlite] SQLite Corruption - Probably Related to auto-vacuum

2007-01-03 Thread drh
Check-in [3548] fixes a problem in the pager which can lead to database corruption on a heavily loaded system running autovacuum. I am continuing to analyze the problem in order to fully characterize the circumstances under which database corruption might occur. Once this analysis is complete, you

Re: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Emerson Clarke
Michael, Im not sure that atomic operations would be a suitable alternative. The reason why im using events/conditions is so that the client thread blocks until the server thread has processed the query and returned the result. If i did not need the result then a simple queueing system with atom

Re: [sqlite] errors @ "./testfixture conflict.test"

2007-01-03 Thread snowcrash+sqlite
comparing with apples' darwin-bundled sqlite src for an older sqlite version (313 was it?), the addition of, -DASSERT_VIA_CALLBACK=1 -DENABLE_LOCKING_CALLBACKS=1 as CFLAGS _seems_ to do the trick. after applying the patch discussed earlier, then, cd /projects/sqlite-3.3.8/configure

[sqlite] undefined reference to 'sqlite3_extension_init' (compile error)

2007-01-03 Thread Klemens Friedl
I am using http://sqlite.org/sqlite-source-3_3_8.zip and mingw gcc and gnu make. v. 3.3.5 worked fine, but with 3.3.8 (3.3.6 introduced the extention thingy) i have problems to compile it, error output: [LD] output-i386\dll\3rdparty\sqlite3\sqlite3.dll sqlite3.temp.exp:fake:(.edata+0x114):

[sqlite] Re: Why is the sqlite3.def file missing in v. 3.3.8 package ??? (SQLite3 source code preprocessed for Win32)

2007-01-03 Thread Klemens Friedl
An addition to my other email: I have just found that it is listed twice in the official SQLite Ticket/Bug-System: http://www.sqlite.org/cvstrac/tktview?tn=2031 http://www.sqlite.org/cvstrac/tktview?tn=2059 Please fix this issue(s), as we from the Win32 user land would like to use SQLite3 in up

[sqlite] Re: Why is the sqlite3.def file missing in v. 3.3.8 package ??? (SQLite3 source code preprocessed for Win32)

2007-01-03 Thread Igor Tandetnik
Klemens Friedl <[EMAIL PROTECTED]> wrote: All SQLite3 Source code package (preprocessing for Win32) except the latest one (v. 3.3.8) have come with "sqlite3.def" file which I used to build sqlite3.dll (dynamic link library). Why hasn't the "sqlite3.def" file been added? http://sqlite.org/sqlite

[sqlite] Why is the sqlite3.def file missing in v. 3.3.8 package ??? (SQLite3 source code preprocessed for Win32)

2007-01-03 Thread Klemens Friedl
All SQLite3 Source code package (preprocessing for Win32) except the latest one (v. 3.3.8) have come with "sqlite3.def" file which I used to build sqlite3.dll (dynamic link library). Why hasn't the "sqlite3.def" file been added? http://sqlite.org/sqlite-source-3_3_8.zip ... no sqlite3.def All o

Re: [sqlite] SQLite Corruption - Probably Related to auto-vacuum

2007-01-03 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > "Ron Avriel" <[EMAIL PROTECTED]> wrote: > > > > > > >If you only run a single process at a time does the problem go > > > >away. (If it does, that indicates that the problem is in the > > > >locking code - an area where Fedo

Re: [sqlite] errors @ "./testfixture conflict.test"

2007-01-03 Thread drh
snowcrash+sqlite <[EMAIL PROTECTED]> wrote: > whittling down the last few testsuite errors, > > % ./testfixture ../sqlite-3.3.8/test/conflict.test > > > the tests that FAIL, all have config param "t0 == 0", where, > > > i _think_ that's the "what" in this error. > > now, the "why" ... > >

Re: [sqlite] [RESOLVED/PATCH] re: "Error: no such function: randstr" @ v3.3.8 on OSX

2007-01-03 Thread drh
snowcrash+sqlite <[EMAIL PROTECTED]> wrote: > > > well, a 0.04% test failure rate ain't bad! > > > > > > > Are you, perchance, running this on a network filesystem of > > some kind? > > nope. all on my 'local' box. > > just starting to look over these ... > > i had NOT *defined* UTF8 as the enc

AW: [sqlite] sqlite performance, locking & threading

2007-01-03 Thread Michael Ruck
Hi Emerson, Another remark: On Windows using Events synchronization objects involves additional kernel context switches and thus slows you down more than necessary. I'd suggest using a queue, which makes use of the InterlockedXXX operations (I've implemented a number of those, including priority b

[sqlite] R: [sqlite] Cross compile error!

2007-01-03 Thread Francesco Andrisani
OK Richard, I've follow your steps and all is fine. I've created libsqlite3.a, but how i create .so files? Another questionwhen i compile a program using cross compile and the libsqlite3.a lib, the executable file (in my case .cgi file) is too big!! Why? If i strip it the size decrease a bit.