[sqlite] Contstant WHERE terms still require table scan?

2015-06-12 Thread Dan Kennedy
On 06/12/2015 05:45 PM, nomad at null.net wrote: > On Fri Jun 12, 2015 at 09:49:29AM +, Hick Gunter wrote: >> Seems the correct code is already generated... > Thanks Hick, that shows a bit more detail I didn't think to look for. > It seems that this only works for bind values, as the

[sqlite] Contstant WHERE terms still require table scan?

2015-06-12 Thread no...@null.net
On Fri Jun 12, 2015 at 09:49:29AM +, Hick Gunter wrote: > Seems the correct code is already generated... Thanks Hick, that shows a bit more detail I didn't think to look for. It seems that this only works for bind values, as the comparison and goto statements aren't present when the term is

[sqlite] Contstant WHERE terms still require table scan?

2015-06-12 Thread no...@null.net
> This would potentially allow me to shortcut some largish UNION > statements. I should clarify: I don't want to have to force my callers to use their own if/then/else statements in order to pick a specific query. I want a single general-purpose query they can call that shortcuts based on a bind

[sqlite] Contstant WHERE terms still require table scan?

2015-06-12 Thread Mark Lawrence
I'm wondering if it would be possible to optimize the query planner for situations where one of the WHERE clauses is a constant that evaluates to false? CREATE TABLE x( id INTEGER PRIMARY KEY ); EXPLAIN QUERY PLAN SELECT x.id FROM x WHERE 1=0

[sqlite] Contstant WHERE terms still require table scan?

2015-06-12 Thread Hick Gunter
Database Betreff: Re: [sqlite] Contstant WHERE terms still require table scan? On Fri Jun 12, 2015 at 09:49:29AM +, Hick Gunter wrote: > Seems the correct code is already generated... Thanks Hick, that shows a bit more detail I didn't think to look for. It seems that this only works for b

[sqlite] Contstant WHERE terms still require table scan?

2015-06-12 Thread Hick Gunter
ers at mailinglists.sqlite.org Betreff: [sqlite] Contstant WHERE terms still require table scan? I'm wondering if it would be possible to optimize the query planner for situations where one of the WHERE clauses is a constant that evaluates to false? CREATE TABLE x( id INTEGER PRIMARY