[sqlite] VACUUM can actually increase the DB file?

2010-09-17 Thread Oliver Schneider
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi there, just a few minutes ago I ran a VACUUM on a DB file and the size before was 2089610240 and afterwards 2135066624. Is this normal? Thanks, // Oliver -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBCAAGBQJMk/T6AAoJE

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Nicolas Williams
On Fri, Sep 17, 2010 at 02:02:44PM -0400, Igor Tandetnik wrote: > Keith Roberts wrote: > > I think what I really mean is I want a text column with only > > one unique value, that is also indexed. > > UNIQUE constraint will do just that. > > > Also ,I guess the INTEGER PRIMARY KEY column is worth

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Keith Roberts
On Fri, 17 Sep 2010, Roger Andersson wrote: > To: 'General Discussion of SQLite Database' > From: Roger Andersson > Subject: Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column? > >> I'm getting there now ;) >> >> Keith > > I don't know if this will be of any help but you can do something like > UPD

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Roger Andersson
> I'm getting there now ;) > > Keith I don't know if this will be of any help but you can do something like UPDATE file_downloads set dl_count = dl_count + 1 where filename = "$dl_file"; /Roger ___ sqlite-users mailing list sqlite-users@sqlite.org htt

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Keith Roberts
On Fri, 17 Sep 2010, Igor Tandetnik wrote: > To: sqlite-users@sqlite.org > From: Igor Tandetnik > Subject: Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column? > > Keith Roberts wrote: >> I think what I really mean is I want a text column with only >> one unique value, that is also indexed. > > UNIQ

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Igor Tandetnik
Keith Roberts wrote: > I think what I really mean is I want a text column with only > one unique value, that is also indexed. UNIQUE constraint will do just that. > Also ,I guess the INTEGER PRIMARY KEY column is worth > keeping in the table, as a matter of course? Usually, yes. -- Igor Tandet

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Keith Roberts
On Fri, 17 Sep 2010, O'Neill, Owen wrote: > To: General Discussion of SQLite Database > From: "O'Neill, Owen" > Subject: Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column? > > > Hi Keith, > > Depending on your definition of 'efficient' then this might do what you > want. (untested - might need to

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Keith Roberts
On Fri, 17 Sep 2010, Igor Tandetnik wrote: > To: sqlite-users@sqlite.org > From: Igor Tandetnik > Subject: Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column? > > Keith Roberts wrote: >> I have the following table to keep a count of the number of >> times files are downloaded from my website: >> >>

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread O'Neill, Owen
Hi Keith, Depending on your definition of 'efficient' then this might do what you want. (untested - might need to add or remove bracket since sqlite does seem fussy about having what it considers to be extra ones) INSERT OR REPLACE INTO "file_downloads" SELECT COALESCE( (SELECT record_i

[sqlite] Check-in [876845661a] incomplete

2010-09-17 Thread Ralf Junker
Check-in [876845661a] (http://www.sqlite.org/src/info/876845661a) is incomplete: fts2_tokenizer.c still contains calls to isalnum() and tolower() for FTS2. FTS1 also #includes , just in case you care to remove it from SQLite completely. The changes are just like for FTS2. Ralf ___

[sqlite] no driver for sqlite3-ruby

2010-09-17 Thread Leo Valk
trying to follow the ruby-on-rails-3.0 tutorial by Michael Hartl I am embarrassingly stuck already at 1.2.5 I have installed ruby 1.9.2 Gems 1.3.7 rails 3.0 set up first_app changed the gemfile to request sqlite3-ruby 1.2.5 saw the welcome page at the localhost:3000 but when I hit the link: about

Re: [sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Igor Tandetnik
Keith Roberts wrote: > I have the following table to keep a count of the number of > times files are downloaded from my website: > > CREATE TABLE "file_downloads" > ( > "record_id" INTEGER PRIMARY KEY, > "filename" char(60), > "dl_count" INTEGER > /* PRIMARY KEY ("record_id") */ > ); > >

[sqlite] UNIQUE PRIMARY KEY on TEXT column?

2010-09-17 Thread Keith Roberts
Hi all. I have the following table to keep a count of the number of times files are downloaded from my website: CREATE TABLE "file_downloads" ( "record_id" INTEGER PRIMARY KEY, "filename" char(60), "dl_count" INTEGER /* PRIMARY KEY ("record_id") */ ); The select statement to get

Re: [sqlite] two table problem.

2010-09-17 Thread Simon Davies
On 16 September 2010 20:15, Chris Bruner wrote: >  I'm stuck with what should be a simple problem, but I can't move past it. > Two tables, I'm trying to update one tables latitude with the other > tables latitude where the zipcode match. (See below) > Can anybody help me? Thanks in advance. > > .

[sqlite] two table problem.

2010-09-17 Thread Chris Bruner
I'm stuck with what should be a simple problem, but I can't move past it. Two tables, I'm trying to update one tables latitude with the other tables latitude where the zipcode match. (See below) Can anybody help me? Thanks in advance. sqlite> .schema CREATE TABLE agents("ZIP" text ,"CUSTOMER"

Re: [sqlite] Building On AIX 6.1 Upgraded From 5.3

2010-09-17 Thread Dr. David Kirkby
On 09/13/10 09:44 PM, Joshua Gatcomb wrote: > I am trying to install the perl module DBD::SQLite. Since it didn't > work, I figured I would start with SQLite (amalgamation tar ball > 3.7.2). > > I am on AIX 6.1 (upgraded from 5.3) using gcc 4.2.0 which is compiled for 5.3 > > I have two theories b