Jayesh A Lalwani wrote:The main questions are
a) How fast is fast enough? and how fast is too fast?
b) What kind of operation do you want to perform? Are you going to do AND operations? WIll you have multiple tables? Will you need to join between multiple tables.
b) How big is this data going to become? Is this data even going to fit in the memory of one server?
All solutions attempt to tradeoff speed for simplicity. What fits your need depends on what your exact need is. The simplest solution that will give best performance is a Hashmap. But, you are limited by the size of the memory, and implementing AND operations and joins across tables will be a nightmare for the average programmer. An in memory database that can understand SQLs will take all the complications off your hands, but then you add overhead of parsing the SQL. A NoSQL database can grow as the data grows, but some of them are limited in the kind of operations you can do.
When you are talking about performance, your solution should meet the anticipated need. Overoptimization is the root of all evil.
Mike Cheung wrote:a) From my perspective the faster it is the better.