Re: [sqlite] Incorporating FTS into existing database schema

2008-08-28 Thread Andreas Ntaflos
On Wednesday 27 August 2008 16:39:05 P Kishor wrote: > So, now help me and the rest of the community making a nice set of FTS > notes that contain all the info, from compilation to usage. ;-) Once I finish the application in question and can say with certainty that I used FTS well and know all

Re: [sqlite] How can I load big file into a sqlite database?

2008-08-28 Thread 정현 남궁
Thanks Alex, "import FILE TABLE" is exactly what I'd like to do ^^ Junghyun> Date: Fri, 29 Aug 2008 00:39:03 +0900> From: [EMAIL PROTECTED]> To: sqlite-users@sqlite.org> Subject: Re: [sqlite] How can I load big file into a sqlite database?> > > I usually used "load data infile" command

Re: [sqlite] problem using random() in queries

2008-08-28 Thread D. Richard Hipp
On Aug 28, 2008, at 12:00 PM, Igor Tandetnik wrote: > Tmb <[EMAIL PROTECTED]> wrote: >> I created a SQLite database where a table 'names' is located. This >> table stores just a single column called 'name'. Now I tried for test >> purposes to create a random number within range [0..1] for each

Re: [sqlite] Broken indexes ...

2008-08-28 Thread Jordan Hayes
>> I had a power failure yesterday and an active database of >> mine is now trashed. > > I'm curious how you got to this point. If the power failed during a > transaction there should have been a rollback journal file beside the > database file which the sqlite library would discover and use to

Re: [sqlite] Broken indexes ...

2008-08-28 Thread Dennis Cote
Jordan Hayes wrote: > I had a power failure yesterday and an active database of mine is now > trashed. The output of "pragma integrity_check" includes lots of > > rowid missing from index MyIndexName > > and > > wrong # of entries in index OtherIndexName > > messages. > > Plus

Re: [sqlite] Broken indexes ...

2008-08-28 Thread D. Richard Hipp
On Aug 28, 2008, at 5:59 PM, Jordan Hayes wrote: > I had a power failure yesterday and an active database of mine is now > trashed. The output of "pragma integrity_check" includes lots of > >rowid missing from index MyIndexName > > and > >wrong # of entries in index OtherIndexName

[sqlite] Broken indexes ...

2008-08-28 Thread Jordan Hayes
I had a power failure yesterday and an active database of mine is now trashed. The output of "pragma integrity_check" includes lots of rowid missing from index MyIndexName and wrong # of entries in index OtherIndexName messages. Plus this: On tree page 4 cell 17: 2nd

Re: [sqlite] create table if not exists & virtual table?

2008-08-28 Thread Scott Hess
There is already such a feature request at: http://www.sqlite.org/cvstrac/tktview?tn=2604 I just added a patch there which, I believe, implements this. I'm going to float it on sqlite-dev to see if I'm missing anything. -scott On Wed, Aug 27, 2008 at 9:20 AM, Petite Abeille <[EMAIL

Re: [sqlite] sqlite comparer

2008-08-28 Thread Francisco Azevedo
Hi Shane > There may be one... if not, you could always use .dump from the CLI on both > and then run the text based dumps though a merge utility (like WinMerge) or > through a diff utility. This would probably give you a reasonably good > starting point. Seems the only way so far. But this is

Re: [sqlite] sqlite comparer

2008-08-28 Thread Shane Harrelson
There may be one... if not, you could always use .dump from the CLI on both and then run the text based dumps though a merge utility (like WinMerge) or through a diff utility. This would probably give you a reasonably good starting point. ___

Re: [sqlite] Understanding how SQLite works

2008-08-28 Thread John Stanton
Sqlite maintains its data in a disk file. It only reads and writes to that file sufficient bytes to maintain changes to the database or to satisfy the query. It uses memory to cache data while it processes it and will write changed parts of that data back to the disk file. Fundamentally

Re: [sqlite] problem using random() in queries

2008-08-28 Thread Dennis Cote
Igor Tandetnik wrote: > > It looks like random() is run twice for each row - once in WHERE clause > and again in the SELECT clause. This looks like a bug. > I agree, this looks like a bug. This is a simpler query that shows the same problem. sqlite> create table t (id, a); sqlite> select a,

Re: [sqlite] problem using random() in queries

2008-08-28 Thread Dennis Cote
Tmb wrote: > I created a SQLite database where a table 'names' is located. This table > stores just a single column called 'name'. Now I tried for test purposes to > create a random number within range [0..1] for each record in the table > using a SELECT statement like this: > > select name,

Re: [sqlite] problem using random() in queries

2008-08-28 Thread Igor Tandetnik
Tmb <[EMAIL PROTECTED]> wrote: > Igor Tandetnik wrote: >> >> Try this: >> >> select name, RNDValue >> from ( >> select name, (random() / 9223372036854775807.0 + 1.0) / 2.0 as >> RNDValue from names >> ) >> where RNDValue >= 0.99; >> > > Thank you for your answer. I tried the subselect and it

Re: [sqlite] problem using random() in queries

2008-08-28 Thread Tmb
Igor Tandetnik wrote: > > Try this: > > select name, RNDValue > from ( > select name, (random() / 9223372036854775807.0 + 1.0) / 2.0 as > RNDValue from names > ) > where RNDValue >= 0.99; > > Igor Tandetnik > > Thank you for your answer. I tried the subselect and it seems that there

Re: [sqlite] problem using random() in queries

2008-08-28 Thread Igor Tandetnik
Tmb <[EMAIL PROTECTED]> wrote: > I created a SQLite database where a table 'names' is located. This > table stores just a single column called 'name'. Now I tried for test > purposes to create a random number within range [0..1] for each > record in the table using a SELECT statement like this: >

[sqlite] problem using random() in queries

2008-08-28 Thread Tmb
I created a SQLite database where a table 'names' is located. This table stores just a single column called 'name'. Now I tried for test purposes to create a random number within range [0..1] for each record in the table using a SELECT statement like this: select name, (random() /

Re: [sqlite] How can I load big file into a sqlite database?

2008-08-28 Thread Alexandre Courbot
> I usually used "load data infile" command in mysql to insert long list of > data. > But I could not find this kind of command in sqlite. > How do you load big file into a sqlite database?? I guess what you want to do is "sqlite3 databasefile < infile" See also the ".import FILE TABLE" command

Re: [sqlite] Understanding how SQLite works

2008-08-28 Thread Darrell Lee
Igor Tandetnik wrote: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> I understand that the SQLite database resides in memory. >> > > Not usually, no. There's an in-memory cache of recently accessed pages, > but most of the database (especially a large database)

[sqlite] How can I load big file into a sqlite database?

2008-08-28 Thread 정현 남궁
Hi all, I usually used "load data infile" command in mysql to insert long list of data. But I could not find this kind of command in sqlite. How do you load big file into a sqlite database?? Thanks for your future help~!

Re: [sqlite] Manifest Typing performance impact?

2008-08-28 Thread D. Richard Hipp
On Aug 28, 2008, at 3:19 AM, [EMAIL PROTECTED] wrote: >> Is there a performance hit assosiated with manifest typing? > > I'm not sure about performance, but I assume that static typing > might reduce memory usage (especially with small caches). Internally > every type in sqlite is stored in

Re: [sqlite] Manifest Typing performance impact?

2008-08-28 Thread BardzoTajneKonto
> Is there a performance hit assosiated with manifest typing? I'm not sure about performance, but I assume that static typing might reduce memory usage (especially with small caches). Internally every type in sqlite is stored in structure that takes 64 bytes (little more on 64 bit systems).

Re: [sqlite] Index memory usage in SQLite

2008-08-28 Thread Dave Toll
I hadn't found the malloc page - thanks for the link, it helps a lot. I'll look into moving to memsys5 when I upgrade to SQLite 3.6.1. I assumed I needed SQLITE_32BIT_ROWID as I have no native 64-bit integer support available - maybe it's not necessary after all? I also defined SQLITE_INT64_TYPE