Re: [sqlite] Optimizer limitation with partial indexes

2020-02-12 Thread Wout Mertens
Does moving the expr3 work? SELECT * FROM Table WHERE ((expr1 > val1 AND AND expr3) OR (expr2 > val2 AND expr3)) Wout. On Wed, Feb 12, 2020 at 12:09 AM Jens Alfke wrote: > I'm running into a problem with partial indexes; apparently the query > optimizer isn't smart enough. > > I currently hav

[sqlite] Optimizer limitation with partial indexes

2020-02-11 Thread Jens Alfke
I'm running into a problem with partial indexes; apparently the query optimizer isn't smart enough. I currently have indexes of the form CREATE INDEX Index1 ON Table (expr1) CREATE INDEX Index2 ON Table (expr2) where expr1 and expr2 are expressions involving table columns. The pr