11/24/2023 0 Comments Mysql vs postgresql performance 2015Also with scalability, I'm sure there are great technologies for scaling a MySQL database, but Cassandra will always scale, and easily, due to limitations on its feature set. I think MySQL can be a bit verbose and annoying to deal with especially when dealing with optional fields, and migrations if you don't have a good model or tools. MongoDB and CouchDB fit somewhere in the middle of those two extremes. And know that while Cassandra might PROVIDE features to do some of this stuff, it's not what it was built for. That might help explain the trade-off too, MySQL allows you to always rearrange your data tables and the relationships between datasets simply by writing a different query. It's pretty easy to take a MySQL query, make the query a "key" and the response a "value" and store it into Cassandra (e.g. MySQL and SQL is based on group/set theory - it has a way to combine ANY relationship between data sets. Sure, you can have multiple indexes, counter fields etc. It can branch out from there, but that's basically what's going on. TYPICALLY I give Cassandra ONE KEY and I get back ONE DATASET. Optional fields (wide columns): This CAN be done in MySQL with meta tables etc., but it's for-free and by-default in Cassandra.Ĭassandra is key-value or document-based storage.Data is always available, regardless of being 100% "correct". Availability: The opposite of "consistency".However, it will require multiple queries for highly relational data – and "by default" these queries may not be consistent (and the dataset can change between these queries). Speed: For simple retrieval of large documents.MySQL (and relational databases) are more well suited for arbitrary datasets and requirements common in AGILE software projects.Data organization/refactoring (you can have disorganized data anywhere, but MySQL is better with tables that represent "types" or "components" and then combining them into queries - this is called normalization).Consistency/security (as above, you can guarantee that, for instance, no changes happen between the time you read a bank account balance and you update it).Database locking (MUCH easier for financial transactions).There is some content from Hadoop World that you might be interested in. These may have more flexibility than a database for what you are doing. These make use of the Hadoop platform which is used extensively for analytics. There is nothing to stop you from collecting data in one of these platforms and then importing it into a MySQL database for further analysis.īased on your requirements there are tools other than NoSQL databases which you should look at such as Flume. The tradeoff is that you can't use SQL (a benefit for some) so getting reports out may be trickier. Pulling data out is pretty quick too, and you have a lot of flexibility with data format changes. Inserts for both of these platforms are not constrained in the same manner as a relational database. My understanding is that it was easier to add nodes to the latter but this has changed since MongoDB has replication etc built-in. MongoDB and Cassandra are different beasts. This is a benefit if you need to use 3rd party reporting tools etc. Depending on how your final schema looks, MySQL will give you some help with extracting the data as long as you are comfortable with SQL. Can you queue inserts and updates at the application level before insertion into the database? This will give you some flexibility and is probably useful in all cases. Another area to consider is your application. Starting with MySQL you could review O'Reilly's High Performance MySQL, optimise the schema, add more memory perhaps run this on different hardware from the rest of your app (assuming you used MySQL for that), or partition/shard data. People tend to complain about the update/insert performance of relational databases but there are ways to mitigate these issues. NoSQL solutions like MongoDB and Cassandra get a lot of attention for their insert performance. There may be new NoSQL databases and fixes to existing ones, but your question is primarily architectural. I don't feel that the information out there is that dated because the concepts at play are very fundamental. Your ideal solution may use a combination of these, with some consideration for usage patterns. It is more a question of how you use them. There are several ways to achieve this with all of the technologies listed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |