开发者

NoSQL/Document Store Searching

I have researching NoSQL for a while, but I am still struggling to wrap my head around searching and filt开发者_如何学Goering results/documents.

In a NoSQL world, how would I find all data within two timestamps for example? If everything is stored on a key/value basis? Or find all documents within a radius of a latitude and longitude point?

Thanks


Different data structures support different use cases. For instance, a distributed hash-table would be a good choice if you can make do with the limited API of the dictionary/map interface.

If you need to ask more complex queries of your database, then pick a database that supports this use case efficiently. The database landscape is very varied, and there is probably a database out there for you.

For range queries, the BigTable clones (and upwards in expressive querying power) will probably be worth considering.

Even if the database with the right data structure isn't fast enough or can't scale enough, you can still pull tricks like sharding, replication and clever use of caching or search indexes.

How you want to weigh the constraints of consistency, availability, resilience, through-put and latency all depend on the specific problem, and you may find that you need more than one type of database to implement the optimal solution.

Don't artificially make things harder for yourself; premature-optimization, you know.

I work at a MySQL shop and it works fast enough for our hundreds of thousands of transactions a day (millions of queries), and reliably enough for when our software is used in live TV events.

Sorry that I can't give you a more concrete answer than this.


For example MongoDB supports range queries and you can create geo indexes on latitude/longitude info. There are large differences between the NoSQL databases.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜