Re: [sqlite] Warning automatic index on

2016-10-24 Thread Richard Hipp
On 10/24/16, Werner Kleiner wrote: > > In an error log there is a message like: > SQlite warning (284) automatic index on is_mytable(internalvalue) > I do not know why SQLite is warning you about a lack of an index on internalvalue when it is really missing an index on installid. I am unable to

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Werner Kleiner
The result is: 2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e 2016-10-24 14:28 GMT+02:00 Richard Hipp : > Please post the result of the following query: > > SELECT sqlite_source_id(); > > On 10/24/16, Werner Kleiner wrote: >> I have dropped the double index >> DROP INDEX 'Inter

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Richard Hipp
Please post the result of the following query: SELECT sqlite_source_id(); On 10/24/16, Werner Kleiner wrote: > I have dropped the double index > DROP INDEX 'InternalName'; > Then executed the SQL Select statement which caused the sqlite warning. > But same warning, nothing changed. > > Then

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Werner Kleiner
I have dropped the double index DROP INDEX 'InternalName'; Then executed the SQL Select statement which caused the sqlite warning. But same warning, nothing changed. Then I added a new index CREATE INDEX idx_installid ON ... Now the sqlite warning is gone away. :-) The SQL statement has a JOIN

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Richard Hipp
On 10/24/16, Simon Slavin wrote: > > I think it's the "DESC". Since SQLite understands how to search an index > backwards when it needs to, try dropping the DESC on that index and see if > the problem goes away. He already has another index without the DESC :-\ I think those indexes are redunda

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Simon Slavin
On 24 Oct 2016, at 10:11am, Rowan Worth wrote: > However I see you already have an index 'InternalName' which covers the > 'internalvalue' column, so not sure why that isn't being used. Maybe it's > confused by the DESC or the MySQL back-ticks? I think it's the "DESC". Since SQLite understands

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Rowan Worth
On 24 October 2016 at 16:59, Werner Kleiner wrote: > Hello, > > In an error log there is a message like: > SQlite warning (284) automatic index on is_mytable(internalvalue) > > What does this mean? > It means that SQLite's query optimiser has decided the most efficient way to get the results you

[sqlite] Warning automatic index on

2016-10-24 Thread Werner Kleiner
Hello, In an error log there is a message like: SQlite warning (284) automatic index on is_mytable(internalvalue) What does this mean? Can sqlite not use the index correct? How can we check or optimize the index? What do I have to do to cancel the message? Here is the Table DDL: -- Table: is_my