ktimesG.
any insites on solution for my problem

Let's say you build that database with 1 billion points from G to 1B * G
(likely a 50 GB or so sqlite database since you need to index by X[0:4]
Then what? You weren't clear what you want to do with it. If you want to break 135 with this, then you should forget this plan and think again.