I have the following table: Position(x, y, t, userid)
Is it any more effective implementation / data structure to retrieve positions which are close to the position of a specific user walked over a day than the naive implementation I imagined?
This is my pseudo code:
loop all the t (time)
query x0, y0 position of specific user in t
query all x, y position close to x0, y0