Re: [sqlite] Index help...

2018-10-23 Thread Keith Medcalf
here's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Hamesh Shah >Sent: Tuesday, 23 October, 2018 16:45 >To: sq

Re: [sqlite] Index help...

2018-10-23 Thread Simon Slavin
On 23 Oct 2018, at 11:45pm, Hamesh Shah wrote: > CREATE INDEX `detected_model_id_confidence_ts` ON `detected` ( > `model_id`, > `confidence` ASC, > `ts` ASC > ); Create another index with the fields in this order > `model_id` ASC, > `ts` ASC, > `confidence` ASC and try it again. By the way,

Re: [sqlite] Index help...

2018-10-23 Thread Marc L. Allen
I’m not the expert here, but it appears that the cause is that your looking for things greater than some confidence. This forces an index scan. There’s nothing that gives a list of different confidences greater than, in this case .8, but even if it did, an index scan might be faster than individ

[sqlite] Index help...

2018-10-23 Thread Hamesh Shah
I need a little help with some strange indexing behaviour. I have a table called detected. i create a index for: id integer, confidence ASC, timestamp ASC Then when I query with a simple select from where with integer, then confidence, then timestamp in order, for some reason the timestamp index

Re: [sqlite] Index Help

2010-08-04 Thread Simon Slavin
On 4 Aug 2010, at 6:38pm, Alexander Spence wrote: > CREATE TABLE [CommentIndex] ( >[CommentKey] TEXT UNIQUE, >[ThreadPath] TEXT PRIMARY KEY, >[ParentThreadPath] TEXT, >[ParentCommentKey] TEXT, >[NumberOfReplies] INT D

[sqlite] Index Help

2010-08-04 Thread Alexander Spence
Hey guys, I am writing a comment index database and need some help optimizing the indices. Here is my table schema and a list of the possible queries. Please note that they could be Ascending or Descending order by's. This will be used in an enterprise level social media app that must be opt