I am trying to figure out how to pick a database for an application I am working on. The application will be writing to database most of the time and will do very few read operations. To be more exact it will around 100 millions write per day and around a 500 read.
There are no complicated data structures here, just a single table that the maximum size of an entry won't exceed 120 bytes.
I found many resources speaking about how to pick a database but none of them mention performance for heavy write only and a small entries like this.
The usual reasons to pick SQL or NOSQL is not even applied, so I wonder if it even matters.
Note: I tried to simulate 1 million write for mongodb and for postgres and didn't see much difference.
CodePudding user response:
I think that MongoDB is the best choice. You can use replica sets for high availability and sharding for scale.
More over, in postgresql update are implemented with a Copy-On-Write systeme, so updating 20millions rows, 100 millions times a day will need some special vacuum management.
CodePudding user response:
I would give you another perspective.
If your application will always going to have heavy writes and your query is a goingto be read by primary key, then Cassandra is the best option.
In near future, your application would require more reads and/or your queries will be based on multiple fields, then you could use mongo.
If your data is high in number, you need complex queries with multiple indices, you will not regret nosql choice.
If the performance is same with sql and no changes in the future, cost and maintenance effective, no extra costly nosql developer needed, no migration needed then you can live with this.
