Re: [sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-10 Thread jose isaias cabrera
Scott Robison wrote... Yes, it might just need to walk through a larger data set. If nulls are rare, there probably wouldn't be much of a difference (not in front of a computer to check). If the column was mostly nulls, and a lot of rows, it might be a lot faster. Hmmm... Thanks. I have

Re: [sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-09 Thread Scott Robison
On May 9, 2017 9:07 PM, "jose isaias cabrera" wrote: Scott Robison wrote... On Mon, May 8, 2017 at 11:40 AM, Paul van Helden wrote: > Hi, >> >> I use a lot of indexes on fields that typically contain lots of NULLs, so >> the WHERE NOT NULL partial

Re: [sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-09 Thread jose isaias cabrera
Scott Robison wrote... On Mon, May 8, 2017 at 11:40 AM, Paul van Helden wrote: Hi, I use a lot of indexes on fields that typically contain lots of NULLs, so the WHERE NOT NULL partial indexing seems very useful. However when I compare the "EXPLAIN QUERY PLAN" with a

Re: [sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-08 Thread Paul van Helden
On Mon, May 8, 2017 at 8:20 PM, Scott Robison wrote: > On Mon, May 8, 2017 at 11:40 AM, Paul van Helden > wrote: > > Hi, > > > > I use a lot of indexes on fields that typically contain lots of NULLs, so > > the WHERE NOT NULL partial indexing seems

Re: [sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-08 Thread Scott Robison
On Mon, May 8, 2017 at 11:40 AM, Paul van Helden wrote: > Hi, > > I use a lot of indexes on fields that typically contain lots of NULLs, so > the WHERE NOT NULL partial indexing seems very useful. > > However when I compare the "EXPLAIN QUERY PLAN" with a partial index vs. a

[sqlite] Fwd: SELECT Max(IndexedField) doesn't use partial index

2017-05-08 Thread Paul van Helden
Hi, I use a lot of indexes on fields that typically contain lots of NULLs, so the WHERE NOT NULL partial indexing seems very useful. However when I compare the "EXPLAIN QUERY PLAN" with a partial index vs. a normal index, SQLite won't use the index to find Max(IndexedField) if it is a partial