I read the first post in this thread, and too quickly browsed the rest, then sorry if someone already answered this.
Dont use SQL. It is a dead end. SQL (and alike) are meant for queries where speed is not an issue. You should use a memory array for storing all the data you want. Reading from...