[sqlite] huge difference between clustered/nonclustered index usage

2016-04-22 Thread Dominique Devienne
On Fri, Apr 22, 2016 at 6:55 PM, Richard Hipp wrote: > On 4/22/16, Dimitris Bilidas wrote: > > SELECT count(qview1."wlbWellboreName") FROM "discovery" qview2 CROSS > > JOIN "wellbore_development_all" qview1 WHERE > > (qview1."wlbNpdidWellbore" = qview2."wlbNpdidWellbore"); > > You are aware

[sqlite] huge difference between clustered/nonclustered index usage

2016-04-22 Thread Dimitris Bilidas
Hello, I am using sqlite 3.12.2 and I am getting a strange behaviour from a very simple query. I am trying to understand the exact query plan and the cause of this problem. I would be grateful if someone could help me. The query is: SELECT count(qview1."wlbWellboreName") FROM "discovery" qview

[sqlite] huge difference between clustered/nonclustered index usage

2016-04-22 Thread Richard Hipp
On 4/22/16, Dimitris Bilidas wrote: > > The query is: > SELECT count(qview1."wlbWellboreName") FROM "discovery" qview2 CROSS > JOIN "wellbore_development_all" qview1 WHERE > (qview1."wlbNpdidWellbore" = qview2."wlbNpdidWellbore"); You are aware that SQLite uses the CROSS JOIN syntax as a way