Hi,

> I have a question about the performance of my SQLite DB, where the
> db-file has about 20MB and which I use in a Java application via the
> Java wrapper.

First, your timing figures look indeed slower than what I would expect
(using a somewhat similar DB in type and size and a similar select even on
an embedded system)

The Java wrapper might be your first suspective.
Did you try the command line program as a reference?

> TABB has 14785 rows, TABG 7111 rows.
> On my PC the following query requires about 53 seconds:
> select * from TABG a, TABB b where (a.S='3' or a.S='12 or...) and
> b.G=a.G order by a.G asc;

Depending upon how many "or" conditions you have, you might try ot use
the "in" keyword. (Although I would not expect much improvement)

> The times are used only for the query, not connecting etc. I guess it
> has something to do with building up the data structures for the first
> query resp. caching.

I do not think the behaviour you see is sqlite-internal, I would suspect
the Java wrapper.

How large is the output of your selection?
Maybe it is just the transfer (socket, whatever) which takes so much time.

Regards,

Frank Baumgart


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to