![]() Also if I use PostgreSQL and MongoDB, I have to have some kind of a two phase commit mechanism for the transactions that involves both the databases which is kind of an unnecessary effort at this point as I see. PS - In terms of the scalability, I'm not expecting to exceed 400K users in the next 5 years. So what do you guys think? Any tip or suggestion is much appreciated. For example I may need a search feature where I have to search a phrase in several fields and sort the results based on a relevance score and return the results (like in elasticsearch and I think MongoDB has this automatically generated relevance score). But if I go this way my only concern is that the performance of the search queries for JSONB and the complexity of the search queries that I have to implement. I know PostgreSQL has this JSON and JSONB types and have used it before to store unstructured content. I was thinking to use MongoDB to store user content like title, description but having second thoughts whether I really need a MongoDB instance. ![]() automatic and instant scalability, and support for open source PostgreSQL, MongoDB and Apache Cassandra. I need to use a PostgreSQL because there are some schema that I have to enforce and needs ACID compliant transactions. Optimize your application performance and user experience by ensuring that your high-priority requests get executed while your low-priority requests wait for. (Need full text search for description) The old platform has around 200K registered users.įor the database I'm thinking to have a PostgreSQL and a MongoDB instance. The content published by the user will be typically title, description, comments with replies and few hashtags. But on the other hand, thinking about a more dynamic use-case, if one of your e-commerce platform clients had required to read "acquisiton_channel" data and present it on a My Account page, API or Query Language would be required to adopt this data model change dynamically and either do a) or b) or may be something else.For a social media platform that I'm developing, I need to model the database for the user content. Since your use-case was more analytics-driven, I presume changing the way ad-hoc queries are generated in a SQL workbench or in the backoffice client (or likes) would be relatively less complex. Totally with you on the general methodology but I am still wondering what was the data access pattern after you elevated that "acquisition_channel" json key to a proper column: a) migrate existing jsonb."acquisition_channel" data into the new column, read from one place, b) do nothing, data before the change stays in jsonb."acquisition_channel" and new data comes into "acquisition_channel" column, read from both places, c) something else? I know that indexes are a possibility for JSONB, but will that be enough to "level the playing field", performance wise, between the JSONB and more "normal" column lookups? I'm hoping for some guidance about optimizing this. It will be essential that the queries can be fast. I know JSONB is supposed to be faster than JSON, but we're going to ultimately be talking about 10s if not 100s of millions of records in these tables. This would allow for building queries that can easily search both datasets, and by using JSONB a similar pattern to the current design could be preserved. Expanding this to allow for searching both core and extension data is something that is being asked for right now.Īs part of this, I am investigating the possibility of moving the extension data to Postgres, using the JSONB data type. As it is currently designed, the search API only allows for querying fields in the "core" data in Postgres, and then uses the resource ID to lookup the extension data, if it exists, from MongoDB. 7,799 12 59 81 40 I'm not a DBA so this is a comment not an answer, but speed should not be the main consideration when choosing between MySQL and MongoDB. Winner: PostgreSQL 11.1 Online Analytical Processing (OLAP) Compared: PostgreSQL 11.1 and MongoDB 4. Right now, the "core" data is in Postgres, because of its relational nature, and the extension data is in MongoDB because our collection there needs to be flexible enough to fit a variety of business domain needs.īecause of this, searching is the main pain point. The Postgres database management system (DBMS) measured between 4 and 15 times faster than MongoDB in transaction performance testing. ![]() The "core" data is common across all business domains, the "extension" data is where the domain-specific info goes. To ensure it is flexible enough, we are adopting a "core" vs "extension" model. This model is designed to handle large amounts of data with high write and read performance. Data is organized into columns and rows, with each column having its own value. We have an enterprise service that is being designed to provide a critical piece of data to a wide range of business domains. ScyllaDB NoSQL Data Model: ScyllaDB uses a wide column-family data model, which is similar to Apache Cassandra. Ok, so I've got a situation that I'm pursuing possible solutions to.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |