https://gist.github.com/AndrewRose/8805629
Considering you are storing only millions of rows I figured a mysql implementation using blobs should do the trick .. but it all depends on the load you expect .. worth playing around with the idea I think.
Considering you are storing only millions of rows I figured a mysql implementation using blobs should do the trick .. but it all depends on the load you expect .. worth playing around with the idea I think.