Re: [sqlite] Re: Re: Re: Calculating Average Time

2007-11-19 Thread Jonathan Otsuka
On Nov 19, 2007, at 10:59 PM, Igor Tandetnik wrote: Jonathan O <[EMAIL PROTECTED]> wrote: On 11/19/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: What does the data in time_column look like? Currently looks like HH:MM:SS or MM:SS. The latter is going to cause difficulties - SQLite's

Re: [sqlite] Memory Usage

2007-11-19 Thread Trevor Talbot
On 11/19/07, John Stanton <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > If a C program employs perfect 1:1 malloc'ing to free'ing, i.e., has no > > memory leaks, then garbage collection is irrelevant to the topic of > > memory fragmentation. It's not like C can employ a copying garbage > >

Re: [sqlite] Re: Re: Re: Calculating Average Time

2007-11-19 Thread Jonathan Otsuka
On Nov 19, 2007, at 10:59 PM, Igor Tandetnik wrote: Jonathan O <[EMAIL PROTECTED]> wrote: On 11/19/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: What does the data in time_column look like? Currently looks like HH:MM:SS or MM:SS. The latter is going to cause difficulties - SQLite's

Re: [sqlite] Memory Usage

2007-11-19 Thread John Stanton
You confused my point which is that your usual malloc/free definitely does no garbage collection. That does not mean that a C language program cannot perform garbage collection, just look at a Java run time package for an example. If you never execute a free your dynamic memory is

[sqlite] Re: Re: Re: Calculating Average Time

2007-11-19 Thread Igor Tandetnik
Jonathan O <[EMAIL PROTECTED]> wrote: On 11/19/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: What does the data in time_column look like? Currently looks like HH:MM:SS or MM:SS. The latter is going to cause difficulties - SQLite's date/time functions are going to interpret it as HH:MM with

Re: [sqlite] Memory Usage

2007-11-19 Thread Trevor Talbot
On 11/19/07, John Stanton <[EMAIL PROTECTED]> wrote: > Malloc is a concept implemented in various ways, some more successful > than others but all of them hidden from the programmer. Free tries to > give back memory but as you can appreciate unless you use some garbage > collection scheme with

Re: [sqlite] returning Blobs in an oldstyle query ...

2007-11-19 Thread Trevor Talbot
On 11/19/07, Rob Sciuk <[EMAIL PROTECTED]> wrote: > When using the sqlite3_query command, and a callback function, is there a > way of getting the _*STATEMENT*_ for the query string which is currently > executing, reliably from the sqlite3 *opaque type?? No. sqlite3_exec() is simply a wrapper

Re: [sqlite] Where is sqlite3.h?

2007-11-19 Thread James Steward
On Tue, 2007-11-20 at 14:23 +1100, James Steward wrote: > Any hints? I answer my own question. I found it in the preprocessed source zip file. I hope this will do... Cheerio. JS. - To unsubscribe, send email to

Re: [sqlite] Re: Re: Calculating Average Time

2007-11-19 Thread Jonathan O
On 11/19/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > Jonathan O <[EMAIL PROTECTED]> wrote: > > On 11/19/07, Igor Tandetnik <[EMAIL PROTECTED]> > > wrote: > >> > >> Jonathan O > >> <[EMAIL PROTECTED]> > >> wrote: > >>> I have searched (archives/google) and haven't found a solution for > >>>

[sqlite] Where is sqlite3.h?

2007-11-19 Thread James Steward
Hi, I wanted to build a C app, copied the example C code from the Documentation on the web site, and downloaded the prebuilt binaries. There's no header in with the dll and def (for crummy windows). I tried building the source with MSYS/MinGW, but it didn't work out of the box. Any hints?

Re: [sqlite] how do I edit the wiki? or do I?

2007-11-19 Thread P Kishor
On Nov 19, 2007 8:58 PM, Joe Wilson <[EMAIL PROTECTED]> wrote: > Step 1: [Edit] very funny! There is no step 2. I feel silly. I saw the [not logged in] link and just assumed that I couldn't edit. A bit after I emailed my query, I just hit the edit link and voila! Thanks. > > > --- P Kishor

Re: [sqlite] how do I edit the wiki? or do I?

2007-11-19 Thread Joe Wilson
Step 1: [Edit] --- P Kishor <[EMAIL PROTECTED]> wrote: > I would like to put up step-by-step instructions that would make sense > to some one not so developer-like as I. How do I add stuff to the > wiki? or, how do I get a login for the wiki to do so?

[sqlite] Re: Re: Calculating Average Time

2007-11-19 Thread Igor Tandetnik
Jonathan O <[EMAIL PROTECTED]> wrote: On 11/19/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: Jonathan O <[EMAIL PROTECTED]> wrote: I have searched (archives/google) and haven't found a solution for what I need and can't think of a solution so below is my question. I have: Job 1 run 1 with a

Re: [sqlite] Need help reading 3.3.2 database files with 3.5.2...

2007-11-19 Thread Richard Klein
The previous statement is actually more general: SQLite version 3.x.y can read and write any database created by any prior version of SQLite. Even SQLite 2.w.z ? - To unsubscribe, send email to [EMAIL PROTECTED]

[sqlite] how do I edit the wiki? or do I?

2007-11-19 Thread P Kishor
I finally got this blessed full-text search thing working. So that other clueless folks like me don't end up mucking around for 2 days+, I would like to put up step-by-step instructions that would make sense to some one not so developer-like as I. How do I add stuff to the wiki? or, how do I get a

Re: [sqlite] Memory Usage

2007-11-19 Thread Mark Spiegel
Well said. While it may be true that some memory allocators are lacking, the ones I use are quite good. I view with great suspicion developers who thinks they can outsmart the pool allocator. These folks usually add great complexity while having at best a neutral impact on performance and

Re: [sqlite] Re: Performance tuning, and other (silly?) SQLitequestions.

2007-11-19 Thread Michael Ruck
> > > #A more complicated query...runs quite slowly. How can > this be sped > > > up? > > > db eval {SELECT position.odo, data.x, data.y from > position, data WHERE > > > position.odo BETWEEN 1 AND 10020;} > > > > First, you want an index on position.odo. Second, you don't > specify any

Re: [sqlite] Calculating Average Time

2007-11-19 Thread Jonathan O
On 11/19/07, P Kishor <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2007 5:43 PM, Jonathan O <[EMAIL PROTECTED]> wrote: > > I have searched (archives/google) and haven't found a solution for what > I > > need and can't think of a solution so below is my question. > > I have: > >Job 1 run 1 with a

Re: [sqlite] Re: Performance tuning, and other (silly?) SQLite questions.

2007-11-19 Thread James Steward
On Mon, 2007-11-19 at 18:14 -0500, Igor Tandetnik wrote: > James Steward > wrote: > > db eval {CREATE TABLE position(\ > > position_id INTEGER PRIMARY_KEY, \ > > odo INTEGER, \ > > time CURRENT_TIMESTAMP);} > > You probably meant > > -- note no underscore between PRIMARY and KEY > position_id

Re: [sqlite] Re: Calculating Average Time

2007-11-19 Thread Jonathan O
On 11/19/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > Jonathan O <[EMAIL PROTECTED]> wrote: > > I have searched (archives/google) and haven't found a solution for > > what I need and can't think of a solution so below is my question. > > I have: > > Job 1 run 1 with a time of '01:00:15' > >

Re: [sqlite] Re: building a custom DBD::SQLite

2007-11-19 Thread Joe Wilson
Grep for the unresolved external in all the *.[ch] files. sqlite3Fts3InitHashTable lives in ext/fts3/fts3_tokenizer.c. Make sure it is in your makefile. Ditto for fts2, with a slightly different name. If you're building fts2 make sure you compile with -DSQLITE_ENABLE_BROKEN_FTS2

Re: [sqlite] Calculating Average Time

2007-11-19 Thread P Kishor
On Nov 19, 2007 5:43 PM, Jonathan O <[EMAIL PROTECTED]> wrote: > I have searched (archives/google) and haven't found a solution for what I > need and can't think of a solution so below is my question. > I have: >Job 1 run 1 with a time of '01:00:15' >Job 1 run 2 with a time of '01:00:21' >

[sqlite] Re: Calculating Average Time

2007-11-19 Thread Igor Tandetnik
Jonathan O <[EMAIL PROTECTED]> wrote: I have searched (archives/google) and haven't found a solution for what I need and can't think of a solution so below is my question. I have: Job 1 run 1 with a time of '01:00:15' Job 1 run 2 with a time of '01:00:21' What I do is: select

Re: [sqlite] Performance tuning, and other (silly?) SQLite questions.

2007-11-19 Thread Kees Nuyt
[Default] On Tue, 20 Nov 2007 09:56:11 +1100, James Steward <[EMAIL PROTECTED]> wrote: >Hi, > >I am new to SQL and SQLite, so please excuse me if I appear thick at >times. > >I have an application that generates data from a moving vehicle. At a >position there may be 10s of pairs of data.

[sqlite] Calculating Average Time

2007-11-19 Thread Jonathan O
I have searched (archives/google) and haven't found a solution for what I need and can't think of a solution so below is my question. I have: Job 1 run 1 with a time of '01:00:15' Job 1 run 2 with a time of '01:00:21' What I do is: select sum(strftime('%H%M%S', time_column))/2 from table;

[sqlite] Re: building a custom DBD::SQLite

2007-11-19 Thread P Kishor
Here are my travails thus far. I have been singularly unable to build SQLite 3.5.2 with fts3 on Intel Mac OS X 10.4.11 I added the following to my Makefile.in #TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1 TCC += -DSQLITE_CORE=1 TCC += -DSQLITE_ENABLE_FTS3=1 and then added all the fts3 .c and .h files

[sqlite] Re: Performance tuning, and other (silly?) SQLite questions.

2007-11-19 Thread Igor Tandetnik
James Steward wrote: db eval {CREATE TABLE position(\ position_id INTEGER PRIMARY_KEY, \ odo INTEGER, \ time CURRENT_TIMESTAMP);} You probably meant -- note no underscore between PRIMARY and KEY position_id INTEGER PRIMARY KEY -- note DEFAULT keyword time DEFAULT CURRENT_TIMESTAMP db eval

Re: [sqlite] Memory Usage

2007-11-19 Thread John Stanton
James Dennett wrote: -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Monday, November 19, 2007 12:14 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Memory Usage Dynamic allocation is not the problem, it is malloc and free. there is a difference between

Re: [sqlite] Memory Usage

2007-11-19 Thread John Stanton
D. Richard Hipp wrote: On Nov 19, 2007, at 12:36 PM, James Dennett wrote: -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Monday, November 19, 2007 7:36 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Memory Usage Not only applicable to real time systems.

[sqlite] returning Blobs in an oldstyle query ...

2007-11-19 Thread Rob Sciuk
TWIMC, When using the sqlite3_query command, and a callback function, is there a way of getting the _*STATEMENT*_ for the query string which is currently executing, reliably from the sqlite3 *opaque type?? The reason I need this, I'm using SQLITE 3.5.x to manage blobjects of various kinds,

Re: [sqlite] Memory Usage

2007-11-19 Thread John Stanton
Dynamic memory allocation is not the problem, it it memory fragmentation and checkerboarding produced by "free". Avoid the fragmentation and you can run forever. James Dennett wrote: -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Monday, November 19, 2007 7:36

RE: [sqlite] Memory Usage

2007-11-19 Thread James Dennett
> -Original Message- > From: John Stanton [mailto:[EMAIL PROTECTED] > Sent: Monday, November 19, 2007 12:14 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Memory Usage > > Dynamic allocation is not the problem, it is malloc and free. there is > a difference between being

Re: [sqlite] Begin and End Transaction.

2007-11-19 Thread Kees Nuyt
Hi JP, On Mon, 19 Nov 2007 10:54:26 -0800 (PST), Joanne Pham <[EMAIL PROTECTED]> wrote: > Hi All, > Do I need to have the commit/rollback statement > if I have "Begin" and "End" transaction in my program. http://www.sqlite.org/lang_transaction.html : END TRANSACTION is an alias for COMMIT.

Re: [sqlite] Memory Usage

2007-11-19 Thread John Stanton
Dynamic allocation is not the problem, it is malloc and free. there is a difference between being certain and being lucky. James Dennett wrote: -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Monday, November 19, 2007 7:36 AM To: sqlite-users@sqlite.org Subject:

[sqlite] Re: Begin and End Transaction.

2007-11-19 Thread Igor Tandetnik
Joanne Pham wrote: Do I need to have the commit/rollback statement if I have "Begin" and "End" transaction in my program. Thanks, END is a synonym for COMMIT. You can use the two statements interchangeably. Igor Tandetnik

Re: [sqlite] Memory Usage

2007-11-19 Thread D. Richard Hipp
On Nov 19, 2007, at 12:36 PM, James Dennett wrote: -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: Monday, November 19, 2007 7:36 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Memory Usage Not only applicable to real time systems. If you want a program to

[sqlite] Begin and End Transaction.

2007-11-19 Thread Joanne Pham
Hi All, Do I need to have the commit/rollback statement if I have "Begin" and "End" transaction in my program. Thanks, JP Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

RE: [sqlite] Memory Usage

2007-11-19 Thread James Dennett
> -Original Message- > From: John Stanton [mailto:[EMAIL PROTECTED] > Sent: Monday, November 19, 2007 7:36 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Memory Usage > > Not only applicable to real time systems. If you want a program to run > with stability over a long time

Re: [sqlite] Memory Usage

2007-11-19 Thread John Stanton
Not only applicable to real time systems. If you want a program to run with stability over a long time the first step it to eliminate frees and if malloc is used confine it to the intialization. Jim Dodgen wrote: One other note, just about all real-time systems limit the dynamic allocation

RE: [sqlite] cannot commit - no transaction is active

2007-11-19 Thread learning Sqlite3
Thanks! I just make sure if it was caused by sqlite3. It it is not, I will ask apr. > Date: Mon, 19 Nov 2007 12:20:35 +0100 > From: [EMAIL PROTECTED] > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] cannot commit - no transaction is active > > On Nov 19, 2007 9:15 AM, learning Sqlite3 >

Re: [sqlite] cannot commit - no transaction is active

2007-11-19 Thread Srebrenko Sehic
On Nov 19, 2007 9:15 AM, learning Sqlite3 <[EMAIL PROTECTED]> wrote: > I use the function: > apr_dbd_transaction_start(driver, pool, sql, >); > to start a transaction. > > But when I close this transaction with the function: >

RE: [sqlite] Re: Any way to obtain explicit read lock?

2007-11-19 Thread Igor Sereda
Igor, thanks. I almost always use BEGIN IMMEDIATE, so I missed the BEGIN [DEFERRED] variant. Guess it solves the problem, though it seems the lock won't be acquired before SELECT happens. Best regards, Igor -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent:

Re: [sqlite] Data encryption

2007-11-19 Thread Günter Greschenz
sorry, i have been on a business trip until this weekend (i have been some months in korea...), and my server (at home) was turned off by my wife :-) i will reenable it this evening... here is the source again (attached to this mail) cu, gg A.J.Millan wrote: Andreas: Some time ago, in

Re: [sqlite] Can't checkout from cvs

2007-11-19 Thread Dan Kennedy
On osx I was able to use this to avoid having to type the password interactively: cvs -d :pserver:anonymous:[EMAIL PROTECTED]:/sqlite login Dan. On 11/19/07, Rael Bauer <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to checkout source from cvs but running into problems: > At command

[sqlite] cannot commit - no transaction is active

2007-11-19 Thread learning Sqlite3
Hello, I use the function: apr_dbd_transaction_start(driver, pool, sql, ); to start a transaction. But when I close this transaction with the function: apr_dbd_transaction_end(driver, pool, transaction); It always gives the error message: cannot commit

[sqlite] Can't checkout from cvs

2007-11-19 Thread Rael Bauer
Hi, I'm trying to checkout source from cvs but running into problems: At command prompt I type: (using cvs from www.nongnu.org/cvs/) cvs -d :pserver:[EMAIL PROTECTED]:/sqlite login then I get the line: cvs password: I try to type in "anonymous" but I can't type in any keys at all