{"id":54023,"date":"2024-09-09T09:38:28","date_gmt":"2024-09-09T09:38:28","guid":{"rendered":"https:\/\/www.bridge-global.com\/blog\/blog\/?p=54023"},"modified":"2024-09-09T10:36:13","modified_gmt":"2024-09-09T10:36:13","slug":"database-for-optimal-performance-part-2","status":"publish","type":"post","link":"https:\/\/www.bridge-global.com\/blog\/database-for-optimal-performance-part-2\/","title":{"rendered":"Choosing the Best Database for Optimal Performance &#8211; Part 2"},"content":{"rendered":"<div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-2bb8b49a\" data-vce-do-apply=\"all el-2bb8b49a\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-ce654c2a\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-ce654c2a\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-ce654c2a\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-3759f0b0\" data-vce-do-apply=\"all el-3759f0b0\"><p>Choosing the best database requires researching core strategies and behaviors that contribute to maximizing its performance. You will also need to journey deeper into sophisticated techniques, tools, and best practices to enhance the efficiency and scalability of your database systems.<br><br>I am following up on where we left off in our 'super introduction'. There were two major sections in the <a href=\"https:\/\/www.bridge-global.com\/blog\/database-for-optimal-performance-part-1\/\" target=\"_blank\" rel=\"noopener\">previous part of the blog<\/a>:<\/p><ul><li>Different Databases around us, and <\/li><li>Things to know before we choose one<\/li><\/ul><p>So, this final section will go over 'some scribbles on scalability and performance'.<br><br>Let us look at what will help us reach peak database performance, whether managing large datasets, fine-tuning queries, or incorporating AI-driven insights.<br><br>Let's begin.<br><br>A deep understanding of the system is important. It is challenging to stay focused on the end product when using agile, yet we know the core problems.<br><br>Here are some thoughts from a single-point perspective, What are the demands for choosing the 'right' database? You might know all the theoretical solutions by now, like ACID Compliance, Normalization, Denormalization, and others.<br><br>Wait, Denormalization? Yes, you read it right. Sometimes we need to denormalize standards for better performance. There was a common grandpa tale about the Instagram database. Whenever Justin Beiber posts something to Instagram, the Instagram MYSQL Server goes down. On exploring executed queries, the developers found that the count of likes for the post is getting executed at a huge rate. They have to forget the normalization classes and store the number of likes in an additional column. The error that can happen on additional write hits is so inexpensive when compared to the expense of calculating the count of likes at each read.<br><br>Anyway, for more theoretical chapters, you can Google or ask ChatGPT for some \u201cKey Factors to Consider When Choosing a Database\u201d as they sound more theoretical.<br>So, let\u2019s shift our focus to some practical scenarios.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-cc844df3\" data-vce-do-apply=\"all el-cc844df3\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-cf5e8739\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-cf5e8739\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-cf5e8739\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-32fb4e32\" data-vce-do-apply=\"all el-32fb4e32\"><h3>Understanding of Ongoing Technologies<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-b58bcf1f\" data-vce-do-apply=\"all el-b58bcf1f\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-453eda6a\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-453eda6a\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-453eda6a\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-4a489c22\" data-vce-do-apply=\"all el-4a489c22\"><p>Knowledge about different services is the very first thing to choose to understand what becomes the best fit or at least what should be searched for. A clear understanding of the requirement is the next thing to be focused on to bring the best ROI for your <a href=\"https:\/\/www.bridge-global.com\/services\/cloud-services\" target=\"_blank\" rel=\"noopener\">cloud-based solutions<\/a>.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-c9701392\" data-vce-do-apply=\"all el-c9701392\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-50866f4b\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-50866f4b\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-50866f4b\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-8bb3b4e0\" data-vce-do-apply=\"all el-8bb3b4e0\"><h3>Nature of Storage and Querying<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-bd49b946\" data-vce-do-apply=\"all el-bd49b946\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-185ad5e8\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-185ad5e8\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-185ad5e8\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-2a7749ad\" data-vce-do-apply=\"all el-2a7749ad\"><p>What comes to your mind when you hear a problem statement? Does that sound like an aggregator that counts the number of devices at a time, or more like related datasets, like keeping a ledger of cash in a wallet? Or something more complex as we previously discussed, to retain a state like online status and location of Uber drivers?<br><br>These examples shape the data across our <a href=\"https:\/\/www.bridge-global.com\/services\/mobile-application-development\" target=\"_blank\" rel=\"noopener\">mobile applications<\/a> or IoT devices to servers and end as analytics or reports. We have to define the idea of input structure, output structure, storage information, its validity, and the responsible person for an entity.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-97e3f281\" data-vce-do-apply=\"all el-97e3f281\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-8d7d50e6\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-8d7d50e6\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-8d7d50e6\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-5bb63320\" data-vce-do-apply=\"all el-5bb63320\"><h3>Required Persistency<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-64e688db\" data-vce-do-apply=\"all el-64e688db\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-4b1ef030\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-4b1ef030\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-4b1ef030\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-c8cc9ccb\" data-vce-do-apply=\"all el-c8cc9ccb\"><p>It is good to have persistence of data. But what if we can compromise it for performance or cost cutting when needed? It is even better. Consider a case of sharing usage logs from IoT solutions. There is no need to store them as a whole, instead, we can aggregate them and store only what we need for the time being or permanently.<br><br>To crack our own <a href=\"https:\/\/www.bridge-global.com\/services\/custom-software-development\" target=\"_blank\" rel=\"noopener\">custom software solution<\/a>, we have In-Memory, Persistent, and Distributed storage. Previously, we have looked at some entry-level case studies and the need to choose the right databases. This can empower you to understand and shape your inputs, outputs, and the structure needed in storage.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-352d6fc1\" data-vce-do-apply=\"all el-352d6fc1\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-6519952b\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-6519952b\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-6519952b\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-3bd3a84d\" data-vce-do-apply=\"all el-3bd3a84d\"><h3>Supporting Features and Required Performance<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-af872589\" data-vce-do-apply=\"all el-af872589\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-1f4054fe\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-1f4054fe\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-1f4054fe\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-3868d216\" data-vce-do-apply=\"all el-3868d216\"><ul><li>Many databases provide solutions for handling geospatial data, document contents, text search, and plugin facilities. Some are kept to be light.<\/li><li>Some focus on high performance even on millions of data while others start from billions of records. We classify them with respect to their Storage Capacity.<\/li><li>Heavy read requires a read-intrinsic database, while others may develop themselves for heavy write loads. Their throughput, and latency matter in those cases.<\/li><\/ul><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-b5585dfb\" data-vce-do-apply=\"all el-b5585dfb\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-85e5114f\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-85e5114f\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-85e5114f\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-ca3c81c0\" data-vce-do-apply=\"all el-ca3c81c0\"><h2>Scaling<\/h2><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-03945c3f\" data-vce-do-apply=\"all el-03945c3f\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-70e2ce91\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-70e2ce91\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-70e2ce91\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-3ea97542\" data-vce-do-apply=\"all el-3ea97542\"><p>Scaling can be done in different ways.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-baf870f6\" data-vce-do-apply=\"all el-baf870f6\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-9909d661\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-9909d661\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-9909d661\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-a0937f39\" data-vce-do-apply=\"all el-a0937f39\"><h3>Logical partitions<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-1d2b20f9\" data-vce-do-apply=\"all el-1d2b20f9\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-542be695\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-542be695\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-542be695\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-a2ccb5fc\" data-vce-do-apply=\"all el-a2ccb5fc\"><p>Logical partitions are data partitioned based on factors like country or time. For instance, the orders of all users from a specific country will be logically partitioned into a specific table and handled accordingly. Another example is storing data for each year in one table.<\/p><p>We know some of the data like orders or logs get accumulated over time. After a time, these may not be frequently used. It is a rare event and it is okay to face a delay in accessing old data. So, after a time, these can be stored in large storage as we may need limited operations there. Companies like Flipkart store the latest order data in highly available databases such as MySQL (say, the orders of the past year) and archive them to databases like Apache Cassandra. Cassandra is excellent for write operations but not so fast for read operations. Still, It is okay for Flipkart to compromise in performance for large-volume storage and better performance of recent data by clearing earlier ones.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-026e3623\" data-vce-do-apply=\"all el-026e3623\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-223300dd\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-223300dd\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-223300dd\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-c0ca2c00\" data-vce-do-apply=\"all el-c0ca2c00\"><h3>Vertical partitioning<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-e4991c53\" data-vce-do-apply=\"all el-e4991c53\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-e30f6a19\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-e30f6a19\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-e30f6a19\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-8e8e933c\" data-vce-do-apply=\"all el-8e8e933c\"><p>Vertical partitioning is when the table is split into columns with different columns stored on various tables. For example, consider an event booking platform, which has continuously been developed for the last two decades, and may prune to accumulate a large number of columns in the \u201cevent\u201d table. This itself reflects in the performance. We have to separate our columns into multiple tables in such cases.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-a6f21441\" data-vce-do-apply=\"all el-a6f21441\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-ec09b5f7\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-ec09b5f7\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-ec09b5f7\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-81be143c\" data-vce-do-apply=\"all el-81be143c\"><h3>Data Replication<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-0b621d90\" data-vce-do-apply=\"all el-0b621d90\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-6d07c02c\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-6d07c02c\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-6d07c02c\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-616412b0\" data-vce-do-apply=\"all el-616412b0\"><p>When we need to serve more requests than a single database system can handle, we may have to copy the data into multiple databases, sharing the same structure, usually controlled at the application level.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-1fd73ab8\" data-vce-do-apply=\"all el-1fd73ab8\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-0ca96a2a\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-0ca96a2a\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-0ca96a2a\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-2b71a1d2\" data-vce-do-apply=\"all el-2b71a1d2\"><h3>Horizontal Partitioning<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-27dc0e08\" data-vce-do-apply=\"all el-27dc0e08\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-136e13ab\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-136e13ab\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-136e13ab\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-a5300588\" data-vce-do-apply=\"all el-a5300588\"><p>When we feel the performance decreases due to the volume of rows, We may have to partition the data into multiple tables or shards or to other databases, sharing the same copy of data, and syncing across. When we split them into multiple databases, which follow the same schema, this is known as Horizontal Partitioning. This is also usually load-balanced and controlled by a master DB. Non-relational data can be easily scaled horizontally.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-a27f1d97\" data-vce-do-apply=\"all el-a27f1d97\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-6c6ff136\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-6c6ff136\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-6c6ff136\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-a134587c\" data-vce-do-apply=\"all el-a134587c\"><h3>ReadOnly Replica<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-23c4e90d\" data-vce-do-apply=\"all el-23c4e90d\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-3dba97bd\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-3dba97bd\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-3dba97bd\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-0fa316fc\" data-vce-do-apply=\"all el-0fa316fc\"><p>When a column in a row needs to get READ, the database usually places a write-lock on the column to prevent updating that cell by others. Similarly to perform a WRITE, the database places a read-write-lock to prevent any action on this for other requests. This can raise too many deadlock situations, especially when we have the usual Master Slave Replicas.<br><br>When our application has few writes and heavy read spikes, we can usually create read-only copies (replicas) of a master database. The write will be only to the master database and sync will be done underground. This keeps the atomicity of transactions with very few write-based locks, allowing more reads with fewer deadlock-raising situations.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-7bc3823c\" data-vce-do-apply=\"all el-7bc3823c\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-a50f7531\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-a50f7531\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-a50f7531\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-d7a45fca\" data-vce-do-apply=\"all el-d7a45fca\"><h3>Caching<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-3fd882b6\" data-vce-do-apply=\"all el-3fd882b6\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-a3d64fd1\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-a3d64fd1\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-a3d64fd1\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-080dd0f2\" data-vce-do-apply=\"all el-080dd0f2\"><p>Databases like PostgreSQL give the feature of caching responses which is beneficial for repeated query calls. The internal caching mechanism properly balances the cache eviction as well as optimal CPU usage.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-efd2bb6d\" data-vce-do-apply=\"all el-efd2bb6d\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-1984f3f7\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-1984f3f7\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-1984f3f7\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-a763e7e1\" data-vce-do-apply=\"all el-a763e7e1\"><h3>Database Indexing<\/h3><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-0027a6ea\" data-vce-do-apply=\"all el-0027a6ea\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-fddaa1fb\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-fddaa1fb\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-fddaa1fb\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-4fc0a050\" data-vce-do-apply=\"all el-4fc0a050\"><p>Indexing is the master of double-edged swords in the database world. When used correctly, it significantly speeds up queries, but improper use can lead to inefficiencies. Indexing creates a copy of selected columns and points to the corresponding rows, allowing faster lookups. Without indexing, databases perform linear searches with O(n) complexity. With indexing (often using a B+ tree), searches are reduced to O(log n), meaning for 10,000 rows, the search depth is only 4.<\/p><p>But everything comes with its drawbacks. Indexing consumes additional storage and needs to reindex every update. Indexing will not work on non-exact searches like searching with %LIKE%, or when searching or filtering with other combinations. Assume we have an indexed username field for the user's table; this will work only for the query<br><br><code>SELECT * FROM users where username=\"alice149\";<\/code> <br><br>A query like <br><br><code>SELECT * FROM users WHERE username=\"alice149\" AND is_active=true;<\/code> <br><br>or <br><br><code>SELECT * FROM users WHERE username LIKE \"alice%\"<\/code><br><br>will never utilize this index. To get the first one indexed, you have to create something like <br><br><code>CREATE INDEX idx_username_is_active ON users(username, is_active);<\/code><br><br>Creating blindfold indexes can lead to unnecessary overhead, as they may rarely be used but still require maintenance. Proper indexing should be done after profiling queries that frequently hit the database over a period of time.<br><br>The following flowchart covers a brief about how you can choose the category of the database:<br><br><\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-bb91d3c5\" data-vce-do-apply=\"all el-bb91d3c5\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-a0c9e001\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-a0c9e001\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-a0c9e001\"><div class=\"vce-single-image-container vce-single-image--align-left\"><div class=\"vce vce-single-image-wrapper\" id=\"el-979d9d34\" data-vce-do-apply=\"all el-979d9d34\"><figure><div class=\"vce-single-image-inner vce-single-image--absolute\" style=\"padding-bottom: 46.2851%; width: 996px;\"><img loading=\"lazy\" decoding=\"async\" class=\"vce-single-image vcv-lozad\" data-src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2024\/09\/Flowchart.png\" width=\"996\" height=\"461\" src=\"\" data-img-src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2024\/09\/Flowchart.png\" alt=\"Database Flowchart\" title=\"Database Flowchart\" \/><noscript>\n        <img loading=\"lazy\" decoding=\"async\" class=\"vce-single-image\" src=\"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2024\/09\/Flowchart.png\" width=\"996\" height=\"461\" alt=\"Database Flowchart\" title=\"Database Flowchart\" \/>\n      <\/noscript><\/div><figcaption hidden=\"\"><\/figcaption><\/figure><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-a02b4354\" data-vce-do-apply=\"all el-a02b4354\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-ad876fff\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-ad876fff\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-ad876fff\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-8e0e2737\" data-vce-do-apply=\"all el-8e0e2737\"><p><em>Source: <a href=\"https:\/\/medium.com\/wix-engineering\/how-to-choose-the-right-database-for-your-service-97b1670c5632\" target=\"_blank\" rel=\"noopener\">Medium<\/a><\/em><\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-cdf62107\" data-vce-do-apply=\"all el-cdf62107\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-21014dd8\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-21014dd8\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-21014dd8\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-1fe73d8a\" data-vce-do-apply=\"all el-1fe73d8a\"><h2>A Quick Analysis of Performance of Different Operators<\/h2><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vce-row-container\" data-vce-boxed-width=\"true\"><div class=\"vce-row vce-row--col-gap-30 vce-row-equal-height vce-row-content--top\" id=\"el-0ceaf584\" data-vce-do-apply=\"all el-0ceaf584\"><div class=\"vce-row-content\" data-vce-element-content=\"true\"><div class=\"vce-col vce-col--md-auto vce-col--xs-1 vce-col--xs-last vce-col--xs-first vce-col--sm-last vce-col--sm-first vce-col--md-last vce-col--lg-last vce-col--xl-last vce-col--md-first vce-col--lg-first vce-col--xl-first\" id=\"el-681f07d0\"><div class=\"vce-col-inner\" data-vce-do-apply=\"border margin background  el-681f07d0\"><div class=\"vce-col-content\" data-vce-element-content=\"true\" data-vce-do-apply=\"padding el-681f07d0\"><div class=\"vce-text-block\"><div class=\"vce-text-block-wrapper vce\" id=\"el-4f6f6776\" data-vce-do-apply=\"all el-4f6f6776\"><p><strong>1. IN vs EXISTS<br><\/strong><strong>Complexity<\/strong>: IN can be inefficient when used with subqueries, especially if the subquery returns a large dataset.<br><strong>Alternative<\/strong>: Use EXISTS for better performance, especially when we just want to check the presence.<br><strong>Example:<\/strong><\/p><pre>-- Using IN<br>SELECT username FROM users WHERE user_id IN (SELECT user_id FROM orders WHERE order_date &gt; '2024-01-01');<br><br>-- Using EXISTS (better performance)<br>SELECT username FROM users u WHERE EXISTS (<br>    SELECT 1 FROM orders o WHERE o.user_id = u.user_id AND o.order_date &gt; '2024-01-01'<br>);<\/pre><p><strong>2. JOIN vs SUBQUERY<br><\/strong><strong>Complexity<\/strong>: Subqueries can lead to inefficient execution plans.<br><strong>Alternative<\/strong>: Use JOIN to improve performance when possible.<br><strong>Example:<\/strong><\/p><pre>-- Using Subquery<br>SELECT username FROM users WHERE user_id = (SELECT user_id FROM orders WHERE order_id = 123);<br><br>-- Using JOIN (better performance)<br>SELECT u.username FROM users u JOIN orders o ON u.user_id = o.user_id WHERE o.order_id = 123;<\/pre><p><strong>3. LIKE vs Full-Text Search<br><\/strong><strong>Complexity<\/strong>: LIKE '%term%' is slow because it can\u2019t use an index efficiently.<br><strong>Alternative<\/strong>: Use full-text search for faster matching.<br><strong>Example:<\/strong><\/p><pre>-- Using LIKE<br>SELECT * FROM articles WHERE content LIKE '%search_term%';<br><br>-- Using Full-Text Search (better performance)<br>SELECT * FROM articles WHERE MATCH(content) AGAINST('search_term');<\/pre><p><strong>4. UNION vs UNION ALL<br>Complexity<\/strong>: UNION removes duplicates, which can be costly.<br><strong>Alternative<\/strong>: Use UNION ALL if you don\u2019t need to remove duplicates.<br><strong>Example<\/strong>:<\/p><pre>-- Using UNION<br>SELECT username FROM users_2023<br>UNION<br>SELECT username FROM users_2024;<br><br>-- Using UNION ALL (better performance)<br>SELECT username FROM users_2023<br>UNION ALL<br>SELECT username FROM users_2024;<\/pre><p><strong>5. COUNT(*) vs COUNT(column_name)<\/strong><br><strong>Complexity<\/strong>: COUNT(*) can be more efficient, especially if there are no NULL values.<br><strong>Alternative<\/strong>: Use COUNT(column_name) to count only non-null values.<br><strong>Example<\/strong>:<\/p><pre>-- Using COUNT(*)<br>SELECT COUNT(*) FROM users;<br><br>-- Using COUNT(column_name) (only non-null values)<br>SELECT COUNT(email) FROM users;<\/pre><p>These alternatives can lead to significant performance improvements, especially with large datasets.<\/p><p><strong>6. DISTINCT vs GROUP BY<\/strong><br><strong>Complexity<\/strong>: DISTINCT can be inefficient if used to remove duplicates.<br><strong>Alternative<\/strong>: Use GROUP BY if you\u2019re also aggregating data.<br><strong>Example<\/strong>:<\/p><pre>-- Using DISTINCT<br>SELECT DISTINCT user_id FROM orders;<br><br>-- Using GROUP BY (better when also aggregating)<br>SELECT user_id, COUNT(*) FROM orders GROUP BY user_id;<\/pre><p><strong>7. OR vs UNION<\/strong><br><strong>Complexity<\/strong>: Using OR can lead to inefficient query execution, especially with multiple conditions.<br><strong>Alternative<\/strong>: Use UNION to split the query into separate parts.<br><strong>Example<\/strong>:<\/p><pre>-- Using OR<br>SELECT * FROM users WHERE city = 'Kochi' OR city = 'Bangalore';<br><br>-- Using UNION (better performance)<br>SELECT * FROM users WHERE city = 'Kochi'<br>UNION<br>SELECT * FROM users WHERE city = 'Bangalore';<\/pre><p><strong>8. LEFT JOIN vs INNER JOIN<\/strong><br><strong>Complexity<\/strong>: LEFT JOIN returns all rows from the left table, even if there\u2019s no match in the right table, which can be slower.<br><strong>Alternative<\/strong>: Use INNER JOIN if you only need matching rows.<br><strong>Example<\/strong><span style=\"font-weight: 300;\">:<\/span><\/p><pre>-- Using LEFT JOIN<br>SELECT u.username, o.order_id FROM users u LEFT JOIN orders o ON u.user_id = o.user_id;<br><br>-- Using INNER JOIN (better performance when non-matching rows aren't needed)<br>SELECT u.username, o.order_id FROM users u INNER JOIN orders o ON u.user_id = o.user_id;<\/pre><p><strong>9. HAVING vs WHERE<\/strong><br><strong>Complexity<\/strong>: HAVING is generally used for filtering after aggregation, which can be less efficient.<br><strong>Alternative<\/strong>: Use WHERE for filtering before aggregation when possible.<br><strong>Example<\/strong>:<\/p><pre>-- Using HAVING<br>SELECT user_id, COUNT(*) FROM orders GROUP BY user_id HAVING COUNT(*) &gt; 5;<br><br>-- Using WHERE (better when filtering before aggregation)<br>SELECT user_id FROM orders WHERE order_date &gt; '2024-01-01' GROUP BY user_id HAVING COUNT(*) &gt; 5;<\/pre><p><strong>10. ORDER BY with LIMIT vs INDEX<\/strong><br><strong>Complexity<\/strong>: Sorting with ORDER BY and LIMIT can be slow without an appropriate index.<br><strong>Alternative<\/strong>: Create an index to optimize the sort operation.<br><strong>Example<\/strong>:<\/p><pre>-- Using ORDER BY with LIMIT<br>SELECT username FROM users ORDER BY created_at DESC LIMIT 10;<br><br>-- Using an Index (create an index to speed up sorting)<br>CREATE INDEX idx_created_at ON users(created_at DESC);<br>SELECT username FROM users ORDER BY created_at DESC LIMIT 10;<\/pre><p>These optimizations can lead to significant performance gains, especially when dealing with large datasets or complex queries. You can find more of them yourself using AI Tools or Blogs.<\/p><p><strong>Conclusion<\/strong><br>Choosing the \u201cright\u201d database is still far away from this point, and this is not just a technical discussion. We have Firebase Database, which triggers syncs to every one of its connected frontends when the database gets an increment. But we may not need that accuracy everywhere. This is not just a technical discussion but a strategic one that can make or break the whole business. Zerodha, the largest stock market player, still moves with just 30 member teams and a single monolith PostgreSQL instance, when its opponents have 2K+ team size and 30+ microservices. Remember, the database you choose today will shape your application\u2019s growth tomorrow. So, we need careful evaluation. And if you\u2019re still unsure, you can always get the support of a seasoned <a href=\"https:\/\/www.bridge-global.com\/\" target=\"_blank\" rel=\"noopener\">software development company<\/a> to help you out.<\/p><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Deciding a database scaleup strategy and writing an SQL query may require you take certain things into consideration. Here\u2019s a guide to help you out with it.<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":216,"featured_media":54031,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[839],"tags":[840,841,842],"class_list":["post-54023","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database","tag-database-performance-optimization","tag-high-performance-databases","tag-choosing-a-database"],"featured_image_src":"https:\/\/www.bridge-global.com\/blog\/wp-content\/uploads\/2024\/09\/Top-Database-Choices-for-Best-Performance-Part-2.jpg","author_info":{"display_name":"Jerin John","author_link":"https:\/\/www.bridge-global.com\/blog\/author\/jerin\/"},"_links":{"self":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/54023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/users\/216"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/comments?post=54023"}],"version-history":[{"count":10,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/54023\/revisions"}],"predecessor-version":[{"id":54035,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/posts\/54023\/revisions\/54035"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/media\/54031"}],"wp:attachment":[{"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/media?parent=54023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/categories?post=54023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bridge-global.com\/blog\/wp-json\/wp\/v2\/tags?post=54023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}