Wednesday, April 29, 2015

There's data that we currently store in a flat-file database, which gets parsed and exported as a hash...

There's data that we currently store in a flat-file database, which gets parsed and exported as a hash. This is okay, but we've decided it'd be better as a database. 

Problem is, the original hash is not flat, it contains a sub-hash for services last used. So, there's SELECT * FROM TABLE1, which is fast, and SELECT * FROM TABLE2 WHERE user = user_from_table1, which is repeated 1000 times, and is slow, making a drop-in replacement unusable.

I have a functioning MongoDB database, and I'm thinking that slowly pushing the data structure into Mongo every once and a while and using that instead is possibly my solution. Will have to play with that.

No comments:

Post a Comment