[sqlite] ticket 3007

2008-04-04 Thread Ken
Any thoughts on ticket 3007, to disable journalling by passing an omit journal flag to the sqlite3_open_v2 interface? This would have the I/O load for writes and probably double the througput. http://www.sqlite.org/cvstrac/tktview?tn=3007 Thanks, Ken

Re: [sqlite] sqlite3StrICmp

2008-04-04 Thread Steven Fisher
On 04-Apr-2008, at 2:15 PM, Nicolas Williams wrote: > Right, except for the thing about multiple columns with the same name > being OK. "AS" >> 2. I need to use stricmp for comparing column names. I'd rather use >> the same comparison that sqlite3 uses for comparing column NAMES. > > Why can't

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Nicolas Williams
On Fri, Apr 04, 2008 at 01:43:24PM -0700, Steven Fisher wrote: > On 04-Apr-2008, at 1:17 PM, Nicolas Williams wrote: > > Sure there is: > > > >const char *sqlite3_column_decltype(sqlite3_stmt*,int); > >int sqlite3_column_type(sqlite3_stmt*, int iCol); > > This would be useful but, again,

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Steven Fisher
On 04-Apr-2008, at 1:17 PM, Nicolas Williams wrote: > On Fri, Apr 04, 2008 at 01:06:58PM -0700, Steven Fisher wrote: >>> It's not necessarily the same as strcasecmp(). You can have per- >>> column collations. >> >> Column names, not column contents. :) I don't like to have my C code >> rely on

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Nicolas Williams
On Fri, Apr 04, 2008 at 01:06:58PM -0700, Steven Fisher wrote: > > It's not necessarily the same as strcasecmp(). You can have per- > > column collations. > > Column names, not column contents. :) I don't like to have my C code > rely on the order of columns from a query. You can avoid

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Steven Fisher
On 04-Apr-2008, at 12:54 PM, Nicolas Williams wrote: > On Fri, Apr 04, 2008 at 12:48:05PM -0700, Steven Fisher wrote: >> On 03-Apr-2008, at 11:22 PM, Matthew L. Creech wrote: >>> We need to either rename it so >>> that it's part of the library's exported API, or do something >>> different in

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Nicolas Williams
On Fri, Apr 04, 2008 at 12:48:05PM -0700, Steven Fisher wrote: > On 03-Apr-2008, at 11:22 PM, Matthew L. Creech wrote: > > We need to either rename it so > > that it's part of the library's exported API, or do something > > different in tclsqlite.c. > > I would really like to have a few of

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Steven Fisher
On 03-Apr-2008, at 11:22 PM, Matthew L. Creech wrote: > We need to either rename it so > that it's part of the library's exported API, or do something > different in tclsqlite.c. I would really like to have a few of sqlite3's internal functions available to client applications in a

Re: [sqlite] Count(1)

2008-04-04 Thread Scott Hess
I think the main hit to be avoided is in reading all of the interior and leaf pages into the page cache. Once you've done that the additional cost of actually processing the contents of those pages is going to be really small. -scott On Fri, Apr 4, 2008 at 9:48 AM, Noah Hart <[EMAIL

Re: [sqlite] Count(1)

2008-04-04 Thread Jay A. Kreibich
On Fri, Apr 04, 2008 at 09:14:52AM -0700, Scott Hess scratched on the wall: > What I meant when I said "full table scan" is that it has to read at > least something for every single row in the table. So the following > are going to be the same: > > SELECT COUNT(*) FROM t; > SELECT

Re: [sqlite] Count(1)

2008-04-04 Thread Noah Hart
Questions to the SQLite maintainers... The docs tell us that ... ** The page headers looks like this: ** ** OFFSET SIZE DESCRIPTION ** 0 1 Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf ** 1 2 byte offset to the first freeblock

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Nicolas Williams
On Fri, Apr 04, 2008 at 08:48:53AM -0400, D. Richard Hipp wrote: > The way we build the TCL interface that is on the download > page is that the TCL interface code becomes part of the > amalgamation and the whole thing is compiled as a single > translation unit. I cannot imagine why anyone would

Re: [sqlite] Count(1)

2008-04-04 Thread Scott Hess
What I meant when I said "full table scan" is that it has to read at least something for every single row in the table. So the following are going to be the same: SELECT COUNT(*) FROM t; SELECT COUNT(rowid) FROM t; It won't have to scan any overflow pages, but it will have to hit all the

Re: [sqlite] Count(1)

2008-04-04 Thread Nicolas Williams
On Fri, Apr 04, 2008 at 11:19:53AM -0400, Samuel Neff wrote: > Is it really a full table scan or just an index scan (at least in the case > where no data is needed from the table as in the original sample that had no > join or where clause). Either way it's O(N) instead of O(1), which is what the

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Zbigniew Baniewski
On Fri, Apr 04, 2008 at 08:48:53AM -0400, D. Richard Hipp wrote: > This has never been a problem for the prebuilt binaries on > the website. Neither this wasn't any problem for earlier sources (including 3.5.6). > Anyway, you can fix the problem by either using the > precompiled binaries, or

Re: [sqlite] Multiple connections to an in-memory database

2008-04-04 Thread Fin Springs
On Apr 4, 2008, at 11:11 AM, Dennis Cote dennis.cote-at-. | sqlite| wrote: > Why do you need two transactions in parallel? In general only one > connection can have a transaction open on a database at any time. > Locking is used to serialize transactions. Even with two connections, > you

Re: [sqlite] Count(1)

2008-04-04 Thread Jay A. Kreibich
On Fri, Apr 04, 2008 at 11:19:53AM -0400, Samuel Neff scratched on the wall: > Scott, > > Is it really a full table scan or just an index scan (at least in the case > where no data is needed from the table as in the original sample that had no > join or where clause). I wondered about this

Re: [sqlite] Count(1)

2008-04-04 Thread Samuel Neff
Scott, Is it really a full table scan or just an index scan (at least in the case where no data is needed from the table as in the original sample that had no join or where clause). Thanks, Sam On Thu, Apr 3, 2008 at 4:12 PM, Scott Hess <[EMAIL PROTECTED]> wrote: > A little bit more info:

Re: [sqlite] Multiple connections to an in-memory database

2008-04-04 Thread Dennis Cote
Fin Springs wrote: > Is it possible to open multiple connections to an in-memory database? > I'm pretty sure the answer is no. > I have an application that gets a db handle with > sqlite3_open(":memory"). If another thread in the application were to > make that same call, would it get the

[sqlite] Multiple connections to an in-memory database

2008-04-04 Thread Fin Springs
Is it possible to open multiple connections to an in-memory database? I have an application that gets a db handle with sqlite3_open(":memory"). If another thread in the application were to make that same call, would it get the same handle, another handle to the same in-memory database, or a

Re: [sqlite] Multiple connections to an in-memory database

2008-04-04 Thread Igor Tandetnik
Fin Springs <[EMAIL PROTECTED]> wrote: > Is it possible to open multiple connections to an in-memory database? No. > I have an application that gets a db handle with > sqlite3_open(":memory"). If another thread in the application were to > make that same call, would it get the same handle,

[sqlite] Multiple connections to an in-memory database

2008-04-04 Thread Fin Springs
Is it possible to open multiple connections to an in-memory database? I have an application that gets a db handle with sqlite3_open(":memory"). If another thread in the application were to make that same call, would it get the same handle, another handle to the same in-memory database, or a

Re: [sqlite] Update Trigger

2008-04-04 Thread Dennis Cote
Mahalakshmi.m wrote: > > "CREATE TABLE ARTIST (ArtistId INTEGER PRIMARY KEY NOT NULL,ArtistName TEXT > NOT NULL COLLATE NOCASE ,YomiArtistName TEXT NOT NULL,UNIQUE(ArtistName));" > > ArtistId ArtistName YomiArtistName > 10bbb

[sqlite] Any way to get more information than "constraint failed" when a constraint fails?

2008-04-04 Thread Samuel Neff
Is there any way to get more information from SQLite when a constraint fails, particularly which field caused the constraint to fail? Ideally the error message should list the field name that caused the constraint to fail, the bad value, and even the constraint itself. This is what I get...

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread D. Richard Hipp
On Apr 3, 2008, at 10:46 PM, Zbigniew Baniewski wrote: > I'm sorry to confirm the problem described at http://tinyurl.com/ > 29wc8x > > #v+ > $ tclsh8.5 > % package require sqlite3 > couldn't load file "/usr/lib/sqlite3/libtclsqlite3.so.0": > /usr/lib/sqlite3/libtclsqlite3.so.0: undefined

Re: [sqlite] Reset auto increment / truncate

2008-04-04 Thread uk webdev
Excellent. Exactly what I was looking for. Thank you very much indeed. > To: sqlite-users@sqlite.org > From: [EMAIL PROTECTED] > Date: Fri, 4 Apr 2008 07:37:17 -0400 > Subject: Re: [sqlite] Reset auto increment / truncate > > "uk webdev" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL

Re: [sqlite] Reset auto increment / truncate

2008-04-04 Thread Igor Tandetnik
"uk webdev" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've searched high and low and I cannot find any information on how > to reset an auto increment value to 1. There appears to be no tuncate > command and the usual alter table command for Mysql is also invalid. Are you

[sqlite] Reset auto increment / truncate

2008-04-04 Thread uk webdev
Hi, I've searched high and low and I cannot find any information on how to reset an auto increment value to 1. There appears to be no tuncate command and the usual alter table command for Mysql is also invalid. I have read in various places that "delete from" will reset the auto increent

[sqlite] Update Trigger

2008-04-04 Thread Mahalakshmi.m
Hi, I am having 4 records in my database. I am using Joins method. My Table Looks like: "CREATE TABLE ARTIST (ArtistId INTEGER PRIMARY KEY NOT NULL,ArtistName TEXT NOT NULL COLLATE NOCASE ,YomiArtistName TEXT NOT NULL,UNIQUE(ArtistName));" ArtistIdArtistName

Re: [sqlite] Proper use of sqlite-amalgamation.

2008-04-04 Thread Matthew L. Creech
On Thu, Apr 3, 2008 at 7:11 PM, Amit <[EMAIL PROTECTED]> wrote: > > Ok that is good to know. I will play around with the source > distribution and try to figure out how to get it to work with python > 2.5. According to the python 2.5 documentation, to build Python with > sqlite3, I need the

Re: [sqlite] 3.5.7 & TCL: "undefined symbol: sqlite3StrICmp"

2008-04-04 Thread Matthew L. Creech
On Thu, Apr 3, 2008 at 10:46 PM, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > I'm sorry to confirm the problem described at http://tinyurl.com/29wc8x > > #v+ > $ tclsh8.5 > % package require sqlite3 > couldn't load file "/usr/lib/sqlite3/libtclsqlite3.so.0": >

Re: [sqlite] Proper use of sqlite-amalgamation.

2008-04-04 Thread Amit Uttamchandani
On Fri, 04 Apr 2008 07:42:50 +0200 Dimitri <[EMAIL PROTECTED]> wrote: > Hi, > > > I just had several questions regarding SQLite. While at the download > > page, it states that sqlite-amalgamation is the "preferred" way of > > acquiring SQLite code. So I went ahead and downloaded the latest > >

Re: [sqlite] 3.5.7 Compile Fails On sqlite3.c

2008-04-04 Thread Matthew L. Creech
On Thu, Apr 3, 2008 at 7:05 PM, Robert L Cochran <[EMAIL PROTECTED]> wrote: > Here is what I did: > > tar -xvzf sqlite-3.5.7.tar.gz > cd sqlite-3.5.7 > mkdir bld > cd !$ > ../configure --prefix=/usr/local/sqlite-3.5.7 --disable-tcl > --enable-threadsafe > make > Yeah, this was reported &