Re: [sqlite] What is the best index to create?

2013-11-13 Thread Igor Korot
Anyone? I need to understand which index to create and how to fix the query. Thank you. On Tue, Nov 12, 2013 at 6:17 PM, Igor Korot wrote: > Hi, Simon, > > On Tue, Nov 12, 2013 at 2:18 PM, Simon Slavin wrote: >> >> On 12 Nov 2013, at 9:41pm, Igor

Re: [sqlite] What is the best index to create?

2013-11-12 Thread Igor Korot
Hi, Simon, On Tue, Nov 12, 2013 at 2:18 PM, Simon Slavin wrote: > > On 12 Nov 2013, at 9:41pm, Igor Korot wrote: > >> I don't see what is wrong. It should be using foreign key constraints >> on the last two searches, but it looks like it does not. > >

Re: [sqlite] What is the best index to create?

2013-11-12 Thread Simon Slavin
On 12 Nov 2013, at 9:41pm, Igor Korot wrote: > I don't see what is wrong. It should be using foreign key constraints > on the last two searches, but it looks like it does not. Did you actually create the indexes which would be useful for those constraints, or did you just

[sqlite] What is the best index to create?

2013-11-12 Thread Igor Korot
Hi, ALL, sqlite> EXPLAIN QUERY PLAN SELECT DISTINCT playersinleague.playerid, leaguescore hitter.scoreid, leaguescorehitter.value, leaguescorepitcher.scoreid, leaguescore pitcher.value FROM playersinleague, leaguescorehitter, leaguescorepitcher WHERE playersinleague.id = 1 AND