3

My scenario is as follows. I have a data table with a million rows of tuples (say first name and last name), and a client that needs to retrieve a small subset of rows whose first name or last name begins with the query string. Caching this seems like a catch-22, because:

  • On the one hand, I can't store and retrieve the entire data set on every request (would overwhelm the network)
  • On the other hand, I can't just store each row individually, because then I'd have no way to run a query.
  • Storing ranges of values in the cache, with a local "index" or directory would work... except that, you'd have to essentially duplicate the data for each index, which defeats the purpose of even using a distributed cache.

What approach is advisable for this kind of thing? Is it possible to get the benefits of using a distributed cache, or is it simply not feasible for this kind of scenario?

McGarnagle
  • 101,349
  • 31
  • 229
  • 260

1 Answers1

0

Distributed Caching, is feasible for query-able data sets.

But for this scenario there should either be native function or procedure that would give much faster results. If different scope are not possible like session or application then it would be much of iteration required on server side for fetching the data for each request.

Indexing on server side then of Database is never a good idea.

If still there are network issues. You could go ahead for Document Oriented or Column Oriented NoSQL DB. If feasible.

Anand Sanghvi
  • 99
  • 1
  • 2
  • 10