[sqlite] INTERSECT optimization, is it possible?

2010-01-10 Thread Max Vlasov
Documentation says that INTERSECT implemented with temporary tables either in memory or on disk. Is it always the case? The problem is that if I have several selects (six for example) when each produces thousands of results and the intersection is only hundreds the query takes about minute to

Re: [sqlite] Reasons for SQLITE_CANTOPEN

2010-01-10 Thread Filip Navara
Hi! Does "pragma journal_mode=truncate;" make any difference? Is this on Windows? Do you have TortoiseSVN installed on the same system? If you answer Yes to all these questions then use Google, I have already explained at least twice why it happens. Best regards, Filip Navara On Sun, Jan 10,

Re: [sqlite] Help with Transaction Error.

2010-01-10 Thread Simon Slavin
On 10 Jan 2010, at 4:56am, Vathir wrote: > I am trying to use SQL Jet within my java application, but I consistently get > the following error when I run this section of code. For some reason I > cannot open this particular database. If you open the database using the command-line tool, do you

Re: [sqlite] Import a other database. Search for the fastes way

2010-01-10 Thread Carsten Giesen
Hello, Thanks. That's rock Greate. Cu Carsten -Ursprüngliche Nachricht- Von: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] Im Auftrag von Dan Bishop Gesendet: Samstag, 9. Januar 2010 18:14 An: General Discussion of SQLite Database Betreff: Re: [sqlite]

Re: [sqlite] Import a other database. Search for the fastes way

2010-01-10 Thread Wolfgang Enzinger
Am Sat, 9 Jan 2010 22:00:04 +0100 schrieb Carsten Giesen: [Transactions] > Thanks. That's rock > Greate. Next, play with some PRAGMA settings to achieve even more speed, especially: PRAGMA cache_size = Number-of-pages; PRAGMA page_size = bytes; Also (it's not clear whether you do this

Re: [sqlite] Reasons for SQLITE_CANTOPEN

2010-01-10 Thread Nikolaus Rath
Filip Navara writes: >> I am accessing the same database from several threads, each using a >> separate connection. Shared cache is not enabled. >> >> When my program has been running for a while, I suddenly get an >> SQLITE_CANTOPEN error when I'm trying to open a

Re: [sqlite] Reasons for SQLITE_CANTOPEN

2010-01-10 Thread Edzard Pasma
Op 10-jan-2010, om 19:25 heeft Nikolaus Rath het volgende geschreven: > Filip Navara writes: >>> I am accessing the same database from several threads, each using a >>> separate connection. Shared cache is not enabled. >>> >>> When my program has been running for a

Re: [sqlite] Reasons for SQLITE_CANTOPEN

2010-01-10 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nikolaus Rath wrote: > Can someone tell me under which conditions sqlite returns > SQLITE_CANTOPEN, and how I can figure out what problem it encounters > exactly? Start your program prefixed by 'strace -f -o /tmp/strace.log -s 200' and then look for

Re: [sqlite] INTERSECT optimization, is it possible?

2010-01-10 Thread darren
Considering that INTERSECT is logically nothing but a special case of relational join (the exact opposite of cartesian product), where all columns are involved in the join condition, you should just be able to reuse any optimizations that exist for join, including primary/unique keys/etc. --

Re: [sqlite] INTERSECT optimization, is it possible?

2010-01-10 Thread D. Richard Hipp
On Jan 10, 2010, at 4:50 AM, Max Vlasov wrote: > Documentation says that INTERSECT implemented with temporary tables > either > in memory or on disk. Is it always the case? No. If there is an ORDER BY clause, SQLite may run each subquery as a separate co-routine and merge the results. If

Re: [sqlite] INTERSECT optimization, is it possible?

2010-01-10 Thread Max Vlasov
On Mon, Jan 11, 2010 at 12:56 AM, D. Richard Hipp wrote: > > On Jan 10, 2010, at 4:50 AM, Max Vlasov wrote: > > > Documentation says that INTERSECT implemented with temporary tables > > either > > in memory or on disk. Is it always the case? > > No. > > If there is an ORDER BY

Re: [sqlite] Reasons for SQLITE_CANTOPEN

2010-01-10 Thread Nikolaus Rath
Edzard Pasma writes: > Op 10-jan-2010, om 19:25 heeft Nikolaus Rath het volgende geschreven: > >> Filip Navara writes: I am accessing the same database from several threads, each using a separate connection. Shared cache is not enabled.

Re: [sqlite] graphs and sql

2010-01-10 Thread Dan Bishop
Robert Citek wrote: > Hello all, > > Does anyone have any recommendations for books or other resources that > deal with working with graphs (i.e. vertexes and edges) using sql? > > For example, if I could store a graph in a sqlite database, I'd like > to query the database to know if the graph

[sqlite] Performace regression bug of sqlite 3.6.18

2010-01-10 Thread Hub Dog
I think I found a performance regression bug of sqlite 3.6.1 8. A sql will cost 1800 seconds to return the query result with sqlite 3.6.18 and with the previous version it only cost about 170 seconds. I just attach the sql can reproduce the bug under below. But the database is a little large

Re: [sqlite] graphs and sql

2010-01-10 Thread Robert Citek
On Sat, Jan 9, 2010 at 5:44 PM, Jay A. Kreibich wrote: > On Sat, Jan 09, 2010 at 03:41:24PM -0500, Robert Citek scratched on the wall: >> Does anyone have any recommendations for books or other resources that >> deal with working with graphs (i.e. vertexes and edges) using sql? >

Re: [sqlite] graphs and sql

2010-01-10 Thread Robert Citek
On Sun, Jan 10, 2010 at 8:06 PM, Dan Bishop wrote: > Robert Citek wrote: >> Does anyone have any recommendations for books or other resources that >> deal with working with graphs (i.e. vertexes and edges) using sql? >> > I don't think that SQL is the best language for

Re: [sqlite] graphs and sql

2010-01-10 Thread Nick Atty
Robert Citek wrote: > On Sun, Jan 10, 2010 at 8:06 PM, Dan Bishop wrote: >> Robert Citek wrote: >>> Does anyone have any recommendations for books or other resources that >>> deal with working with graphs (i.e. vertexes and edges) using sql? >>> >> I don't think that SQL is

[sqlite] Minor bug: v3.6.22 not showing up as release in fossil!

2010-01-10 Thread WClark
Hi, not a major one, but... version 3.6.22 has not been tagged as "release" in the fossil repository (e.g. in http://www.sqlite.org/src/timeline?t=release). Cheers Will ___ sqlite-users mailing list sqlite-users@sqlite.org