Re: [sqlite] Query or table

2011-01-19 Thread Ian Hardingham
Many thanks for the advice Phil, I'll follow it. Ian On 19/01/2011 13:06, Philip Graham Willoughby wrote: > Ian, > > On 18 Jan 2011, at 16:40, Ian Hardingham wrote: > >> In general, my server is too slow. It has to run many operations a >> second, and many DB operations, so the exact definition

Re: [sqlite] Query or table

2011-01-19 Thread Philip Graham Willoughby
Ian, On 18 Jan 2011, at 16:40, Ian Hardingham wrote: > In general, my server is too slow. It has to run many operations a > second, and many DB operations, so the exact definition of "too slow" is > a little arbitrary. Nothing in that paragraph implies that the DB speed is a problem, or that

Re: [sqlite] Query or table

2011-01-18 Thread Ian Hardingham
Hi Phil, thanks for the information. In general, my server is too slow. It has to run many operations a second, and many DB operations, so the exact definition of "too slow" is a little arbitrary. I'm intruiged that you feel a pre-computed table is not a good idea. Is there an expectation th

Re: [sqlite] Query or table

2011-01-18 Thread Philip Graham Willoughby
On 18 Jan 2011, at 13:51, Ian Hardingham wrote: > Hey guys. I am currently doing the following to find out the "record" > between two players in my game: > > SELECT count(*) TotalGames, sum(score > 0) GamesWonByPlayer1, sum(score > < 0) GamesWonByPlayer2, sum(score = 0) Draws FROM multiturnTa