RE: [sqlite] I need help making this code run faster

2006-07-18 Thread Brannon King
I can see no difference in my time measurements in changing the "order by desc limit 1" to "max". > >I'm wondering if the following query can be done as a single query > >rather than running it in a (nested) loop. > > > >Suppose a database with five columns; xStart, yStart, xEnd, yEnd, >

[sqlite] I need help making this code run faster

2006-07-18 Thread Brannon King
I'm wondering if the following query can be done as a single query rather than running it in a (nested) loop. Suppose a database with five columns; xStart, yStart, xEnd, yEnd, score. I need the maximum score at the midpoint of the line quantized to a 64x64 grid. Psuedo code: query = prepare("