Re: [sqlite] Problems with SQLite in-memory tables/indexes

2008-10-28 Thread Jonas Truemper
No idea? Or have you just missed this email accidentially? Cheers, Jonas Jonas Truemper schrieb: > Hello everybody, > > we are using SQLite with in-memory tables to speed up importing of data > into persistent tables. We therefore clone the persistent table's > structure by querying the

Re: [sqlite] Temporary Table Speed Up Select

2008-10-28 Thread Andrew Gatt
Thomas Briggs wrote: >Ultimately it'll depend on your schema and the query you're > running, but you're probably better off creating an index that covers > the SELECT query you're executing. That should make the query fast > and save you the hassle of writing and maintaining triggers. > >

Re: [sqlite] How to speed up read-only databases?

2008-10-28 Thread Christophe Leske
> Speedup tip: > http://article.gmane.org/gmane.comp.db.sqlite.general/41990 > Hello Mike, first of all, thank you for your tips. Yes, i saw that posting, and i am already using it in my code. But thanks again, -- Christophe Leske www.multimedial.de - [EMAIL PROTECTED]

[sqlite] Rewriting contents of a column?

2008-10-28 Thread Gilles Ganault
Hello I have a list of books in an SQLite database. I'd like to rewrite the Price column so that: 1. When it says "US$ 1.12", turn this into "$ 1.12" 2. When it says nothing, the currency is actually in Euros, and rewrite this as "€10,19". Can SQLite do this, or should I write a script to

Re: [sqlite] Sqlite3 delete action is too slow

2008-10-28 Thread MikeW
PennyH <[EMAIL PROTECTED]> writes: > > > Thank you MikeW. I try to use transaction, still slow. Use limit clause is > good idea, but the help is limited. Dose number of index affect speed too? > How many index on one table is better? > > Regards, > > Penny > I don't know about the effect of

Re: [sqlite] Rewriting contents of a column?

2008-10-28 Thread MikeW
Gilles Ganault <[EMAIL PROTECTED]> writes: > > Hello > > I have a list of books in an SQLite database. I'd like to rewrite the > Price column so that: > 1. When it says "US$ 1.12", turn this into "$ 1.12" > 2. When it says nothing, the currency is actually in Euros, and > rewrite this as

Re: [sqlite] How to speed up read-only databases?

2008-10-28 Thread Eduardo Morras
At 13:47 15/10/2008, you wrote: >Hi there, > >i am using a 120MB database in an embedded project (a DVD-ROM project) >and was wondering what I can do to speed up its reading using diverse >PRAGMA statements. >The database is locked, meaning that no data is being inserted or >deleted from it. I am

Re: [sqlite] How to speed up read-only databases?

2008-10-28 Thread Christophe Leske
> How many memory has your embedded project? You can create a new > in-memory database and copy there your database data. > That´s what i am currently doing, but we are using too much memory this way, we are out of specs. -- Christophe Leske www.multimedial.de - [EMAIL PROTECTED]

Re: [sqlite] Rewriting contents of a column?

2008-10-28 Thread Igor Tandetnik
"Gilles Ganault" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'd like to rewrite the > Price column so that: > 1. When it says "US$ 1.12", turn this into "$ 1.12" > 2. When it says nothing, the currency is actually in Euros, and > rewrite this as "?10,19". What do you mean

[sqlite] Increase SQLITE_MAX_VARIABLE_NUMBER

2008-10-28 Thread elbart0
Hello, Currently, we are using lucene to do full-text search (may be we will switch to FTS3). And we inject all the ids returned by lucene in prepared statements to load the data. But we have to check that the ids collection size is not greater than SQLITE_MAX_VARIABLE_NUMBER (999 by default)

[sqlite] Insert speed of BLOBs

2008-10-28 Thread Jørgen Berntsen
Hi All I have a program which is used to display a lot (=1) of JPEG2000 images. The size is about 25KB. Using a NTFS filesystem gives quite slow loading speed, thus I decided to test sqlite. The reading of images is very impressing and much faster than NTFS :-) However, when I write the

Re: [sqlite] Insert speed of BLOBs

2008-10-28 Thread Igor Tandetnik
"Jørgen Berntsen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > However, when I write the images to the database everything is very > slow and writing 1 BLOBs takes about 20-30 minutes. As our users > is not that pacient they currently will not use this approach! Wrap all

Re: [sqlite] Sqlite3 delete action is too slow

2008-10-28 Thread P Kishor
On 10/24/08, yhuang <[EMAIL PROTECTED]> wrote: > I create a DB and only one table in the DB. There are 3641043 records in the > DB file. Min id is 27081364, Max id is 30902585. > > I did follow operation: > > sqlite> delete from XXX where userId>3090 and userId<30902000; > > took 1'32'' >

Re: [sqlite] Temporary Table Speed Up Select

2008-10-28 Thread Thomas Briggs
How much slower is the index than your pre-populated table? If you're really comparing apples to apples it would be good to know how big the different is. If you post your schema and queries you'll probably get better advice. At that this I'm just guessing. -T On Tue, Oct 28, 2008

Re: [sqlite] Temporary Table Speed Up Select

2008-10-28 Thread Andrew Gatt
Thomas Briggs wrote: >How much slower is the index than your pre-populated table? If > you're really comparing apples to apples it would be good to know how > big the different is. > >If you post your schema and queries you'll probably get better > advice. At that this I'm just guessing.

Re: [sqlite] Temporary Table Speed Up Select

2008-10-28 Thread Thomas Briggs
If you're really sure that the index is correctly designed (WHERE criteria first, covers all SELECT columns, etc.) I won't argue with you. If you do decide to go the table-scanning route, one thing that might speed things up for you is increasing your block size. Larger blocks means fewer

Re: [sqlite] How to speed up read-only databases?

2008-10-28 Thread Julian Bui
Hey MikeW, The article you posted seems like something I might want to try. I am currently using JDBC to embed sqlite in my java app. Do you know if there are equivalent statements for java? Please let me know if you do. Thanks, Julian On Mon, Oct 27, 2008 at 7:58 AM, MikeW <[EMAIL

Re: [sqlite] query performance comparison with access

2008-10-28 Thread Enrique Ramirez
I'm no expert, but I believe I recall reading on one of the SQLite docs that the performance of Joins can be a bit slower than on other DB systems. Seeing as you have a couple of tables being joined, this could be the case. I also think I recall reading some posts in this list about people

[sqlite] sqlite3_total_changes() doesn't include schema changes?

2008-10-28 Thread David Barrett
Am I correct in understanding sqlite3_total_changes() doesn't include changes to the "master" tables, and thus won't reflect schema changes? If so, is there any general way to determine -- given an arbitrary query -- whether or not it changed the database? Basically, I'm creating a replay log

Re: [sqlite] sqlite3_total_changes() doesn't include schema changes?

2008-10-28 Thread Igor Tandetnik
David Barrett <[EMAIL PROTECTED]> wrote: > If so, is there any general way to determine -- given an arbitrary > query -- whether or not it changed the database? Run PRAGMA schema_version before and after. Igor Tandetnik ___ sqlite-users mailing

[sqlite] Windows permissions result in peculiar behavior

2008-10-28 Thread Daniel Stutzbach
I'm running into an odd problem on Windows Vista relating to permissions. I've got a small (77 KB) sqlite DB owned by Administrator. When I access it as Administrator, everything works fine. If I try to access it as a normal user... things get funky. This is what I observe using the sqlite

Re: [sqlite] Windows permissions result in peculiar behavior

2008-10-28 Thread D. Richard Hipp
On Oct 28, 2008, at 5:25 PM, Daniel Stutzbach wrote: > I'm running into an odd problem on Windows Vista relating to > permissions. > I've got a small (77 KB) sqlite DB owned by Administrator. When I > access it > as Administrator, everything works fine. If I try to access it as a >

Re: [sqlite] Windows permissions result in peculiar behavior

2008-10-28 Thread Igor Tandetnik
Daniel Stutzbach <[EMAIL PROTECTED]> wrote: > I'm running into an odd problem on Windows Vista relating to > permissions. I've got a small (77 KB) sqlite DB owned by > Administrator. When I access it as Administrator, everything works > fine. If I try to access it as a normal user... things get

Re: [sqlite] Windows permissions result in peculiar behavior

2008-10-28 Thread Daniel Stutzbach
On Tue, Oct 28, 2008 at 4:34 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Which folder is the database file in? Thanks to Vista file > virtualization, you are probably looking at a different file altogether. > See > Yep, that was it. My application (running as a normal user) tried to write

[sqlite] Hexadecimal Inequalities Failing?

2008-10-28 Thread Clay Baenziger
Hello, I'm trying to use hexadecimal numbers in a where clause and it seems things aren't quite working as expected. I get unknown token errors or inequalities don't return the correct answer. I have one value set: sqlite> SELECT HEX(minMAC) FROM manifests; 00C1

Re: [sqlite] Hexadecimal Inequalities Failing?

2008-10-28 Thread Igor Tandetnik
Clay Baenziger <[EMAIL PROTECTED]> wrote: > Let's try a small number: > sqlite> SELECT HEX(minMAC) FROM manifests WHERE minMAC <= X'04'; > 00C1 > [Wrong -- x'04' < x'00C1'] Blobs are not compared as if they are very large integers, but rather lexicographically, byte by byte (the

[sqlite] Combined Select Statement

2008-10-28 Thread jose isaias cabrera
Greetings! I have two tables: CREATE TABLE X ( login primary key, Name, Password, ..., ProjOwned ); CREATE TABLE Y

Re: [sqlite] Combined Select Statement

2008-10-28 Thread Igor Tandetnik
jose isaias cabrera <[EMAIL PROTECTED]> wrote: > I have two tables: > > CREATE TABLE X > ( > login primary key, > Name, > Password, > ..., > ProjOwned >

Re: [sqlite] Combined Select Statement

2008-10-28 Thread BareFeet
Hi José, > I have two tables: > > CREATE TABLE X >( >login primary key, >Name, >Password, >..., >ProjOwned >); > > > CREATE TABLE Y >

Re: [sqlite] Combined Select Statement

2008-10-28 Thread jose isaias cabrera
thanks, BareFeet. I will give this a try tomorrow. Igor, I tried to reply to your email, but somehow, I can not reply to newsgroup. Weird. But, the relationship is login. thanks, josé > - Original Message - > From: "BareFeet" <[EMAIL PROTECTED]> > To: "General Discussion of

Re: [sqlite] Combined Select Statement

2008-10-28 Thread P Kishor
On 10/28/08, jose isaias cabrera <[EMAIL PROTECTED]> wrote: > > thanks, BareFeet. I will give this a try tomorrow. > > Igor, > > I tried to reply to your email, but somehow, I can not reply to newsgroup. > Weird. But, the relationship is login. If the relationship is X.login = Y.login where

Re: [sqlite] Combined Select Statement

2008-10-28 Thread BareFeet
In reply to: > If the relationship is X.login = Y.login where each is a primary key > in the respective table then you should really reconsider the > structure of your db... they really should be one table. That's only true if every record/row in table X has a corresponding record/row in table

Re: [sqlite] Combined Select Statement

2008-10-28 Thread jose isaias cabrera
> In reply to: > >> If the relationship is X.login = Y.login where each is a primary key >> in the respective table then you should really reconsider the >> structure of your db... they really should be one table. > > That's only true if every record/row in table X has a corresponding >