Re: [sqlite] Slow Query on large database Help

2013-08-08 Thread Petite Abeille
On Aug 8, 2013, at 3:40 PM, Christopher W. Steenwyk wrote: > This database is generated once, and then queried and interrogated multiple > times. So I am most concerned with read speed and not with writing or > updating. Ohohoho… in that case… I have some snake oil to sell you, Dear Sir! If yo

Re: [sqlite] Slow Query on large database Help

2013-08-08 Thread Christopher W. Steenwyk
I just uploaded the output from sqlite3_analyze to dropbox. On Thu, Aug 8, 2013 at 9:40 AM, Christopher W. Steenwyk wrote: > Here is the data from stat1: > > "tbl", "idx", "stat" > "metrics", "metrics_idx", "68682102 2 2 2" > "metrics", "metrics_frame_idx", "68682102 2" > "metrics", "sqlite_aut

Re: [sqlite] Slow Query on large database Help

2013-08-08 Thread Christopher W. Steenwyk
Here is the data from stat1: "tbl", "idx", "stat" "metrics", "metrics_idx", "68682102 2 2 2" "metrics", "metrics_frame_idx", "68682102 2" "metrics", "sqlite_autoindex_mobileye_ldw_metrics_1", "68682102 230 1" "object_characteristics", "object_characteristics_idx", "1148344 164050 31899 1" "object_

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread James K. Lowden
On Wed, 7 Aug 2013 23:13:41 +0200 Petite Abeille wrote: > On Aug 7, 2013, at 9:25 PM, Christopher W. Steenwyk > wrote: > > > Ah, sorry about the attachments, you can find the files here: > > https://www.dropbox.com/l/fpFfcjwwcyhXZgduswCggb > > Ah, also, your schema has a very, hmmm, Entity?att

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread Richard Hipp
On Wed, Aug 7, 2013 at 2:54 PM, Christopher W. Steenwyk wrote: > Hi, > > I have been working on a large database and its queries now for several > weeks and just can't figure out why my query is so slow. I've attached the > schema, my query, and the results of EXPLAIN QUERY from sqliteman. > > A

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread Petite Abeille
On Aug 7, 2013, at 9:25 PM, Christopher W. Steenwyk wrote: > Ah, sorry about the attachments, you can find the files here: > https://www.dropbox.com/l/fpFfcjwwcyhXZgduswCggb Ah, also, your schema has a very, hmmm, Entity–attribute–value (EAV) smell to it (object, attribute, types, values, char

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread Petite Abeille
On Aug 7, 2013, at 9:25 PM, Christopher W. Steenwyk wrote: > Ah, sorry about the attachments, you can find the files here: > https://www.dropbox.com/l/fpFfcjwwcyhXZgduswCggb > > And yes, as the final part of the DB creation I do run ANALYZE. And I do > think the indexes are correct for the quer

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread Christopher W. Steenwyk
Ah, sorry about the attachments, you can find the files here: https://www.dropbox.com/l/fpFfcjwwcyhXZgduswCggb And yes, as the final part of the DB creation I do run ANALYZE. And I do think the indexes are correct for the query. On Wed, Aug 7, 2013 at 3:07 PM, Petite Abeille wrote: > > On Aug 7

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/08/13 11:54, Christopher W. Steenwyk wrote: > I have been working on a large database and its queries now for > several weeks and just can't figure out why my query is so slow. I've > attached the schema, my query, and the results of EXPLAIN QUER

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread Simon Slavin
On 7 Aug 2013, at 7:54pm, Christopher W. Steenwyk wrote: > I've attached the > schema, my query, and the results of EXPLAIN QUERY from sqliteman. Sorry, attachments don't work on this list (we don't want everyone sending us their homework). Could you instead just post your SELECT command and

Re: [sqlite] Slow Query on large database Help

2013-08-07 Thread Petite Abeille
On Aug 7, 2013, at 8:54 PM, "Christopher W. Steenwyk" wrote: > The attached query takes over 6 days to run. “Patience – A minor form of despair, disguised as a virtue.” Also… attachments are stripped out by the mailing list. You may want to try to inline them instead. ___