What is Greenplum Database? Intro to the Big Data Database
Tags: greenplum, database, ai, postgres
Published: 2020-05-13 18:29:53

---
title: What is Greenplum Database? Intro to the Big Data Database
published: true
description: In this post, we explain what Greenplum is, and break down the Greenplum database MPP architecture, advantages, use cases, and how to get started - ScaleGrid blog
tags: Greenplum, Database, AI, PostgreSQL
---
<link rel="canonical" href="https://scalegrid.io/blog/what-is-greenplum-database-intro-to-the-big-data-database/" />
<p style="text-align: justify;"><a href="https://scalegrid.io/blog/what-is-greenplum-database-intro-to-the-big-data-database/"><img class="alignnone size-full wp-image-5348" src="https://scalegrid.io/blog/wp-content/uploads/2020/05/What-is-Greenplum-Database-Intro-to-the-Big-Data-Database-ScaleGrid-Blog.jpg" alt="What is Greenplum Database? Intro to the Big Data Database - ScaleGrid Blog" width="100%" height="auto" /></a></p>
<p style="text-align: justify;"><a style="color: #2da964;" href="https://greenplum.org/" target="_blank">Greenplum Database</a> is a massively parallel processing (MPP) SQL database that is <a style="color: #2da964;" href="https://gpdb.docs.pivotal.io/560/admin_guide/intro/arch_overview.html" target="_blank" rel="nofollow">built and based on</a> PostgreSQL. It can scale towards a multi-petabyte level data workload without a single issue, and it allows access to a cluster of powerful servers that will work together within a single SQL interface where you can view all of the data. In this blog post, we explain <a style="color: #2da964;" href="https://scalegrid.io/blog/what-is-greenplum-database-intro-to-the-big-data-database/" target="_blank">what Greenplum is</a>, and break down the Greenplum architecture, advantages, major use cases, and how to get started.</p>

<h2 style="padding-top: 10px;">What Exactly is Greenplum?</h2>
<p style="text-align: justify;">Greenplum Database is an <a style="color: #2da964;" href="https://github.com/greenplum-db/gpdb">open-source</a>, hardware-agnostic MPP database for analytics, based on PostgreSQL and developed by Pivotal who was later acquired by VMware. It’s architecture was specially designed to manage large-scale data warehouses and business intelligence workloads by giving you the ability to spread your data out across a multitude of servers.</p>
<p style="text-align: justify; padding-bottom:15px;">This feature-packed database provides powerful and rapid analytics on data that scales up to petabyte volumes.</p>


<h2 style="padding-top: 15px;"><a id="1"></a>The Greenplum Architecture</h2>
<p style="text-align: justify;">In order to get a good understanding of the Greenplum architecture, let’s first look at what an MPP database is.</p>

<h3 style="padding-top: 10px;">What is an MPP Database?</h3>
<p style="text-align: justify;">When handling large amounts of complex data, or big data, chances are that your main machine might start getting crushed by all of the data it has to process in order to produce your analytics results. To fill this need for faster processing and enable quicker results, many organizations consider adopting an <a style="color: #2da964;" href="https://www.flydata.com/blog/introduction-to-massively-parallel-processing/">MPP database</a>.</p>
<p style="text-align: justify;">The <a style="color: #2da964;" href="https://whatis.techtarget.com/definition/MPP-massively-parallel-processing">MPP system</a> leverages a shared-nothing architecture to handle multiple operations in parallel. It uses several different processing units which work independently using their own dedicated memory and resources, so the workload is shared across multiple devices instead of just one. Typically an MPP system has one leader node and one or many compute nodes. The leader node, called ‘master’ in Greenplum, tells all the other nodes, called segments in Greenplum, what to do, and amalgamates their responses to create the final answer.</p>
<p style="text-align: justify;">MPP databases <i>scale horizontally</i> by adding more compute resources (nodes), rather than having to worry about upgrading to more and more expensive individual servers (scaling vertically).</p>

<h3 style="padding-top: 10px;">Greenplum Architectural Design</h3>
<p style="text-align: justify;">Based on the PostgreSQL architecture, Greenplum essentially leverages several PostgreSQL database instances at a time in one single Greenplum cluster. PostgreSQL users can quickly familiarize themselves with this database type, as many of the features, configurations and functionality are the same in Greenplum, and includes features designed to optimize how PostgreSQL works for business intelligence (BI) tasks and workloads.</p>
<p style="text-align: justify;">Greenplum also introduced many features which are unavailable within PostgreSQL, such as parallel data loading, resource management, storage enhancements and advanced query optimization, making it an attractive offering when you are comparing the two.</p>
<p style="text-align: justify;">Similarly to PostgreSQL, Greenplum leverages one master server, or host, which is the entry-point to the database, accepting connections, and SQL queries. However, where PostgreSQL leverages standby nodes to geographically distribute their deployment, Greenplum uses segment hosts which store and process the data. Greenplum segments are independent and each store a portion of the data, though handle a majority of the query processing. You can leverage as few as two segment hosts and scale to an unlimited capacity. If you have mirroring enabled, you must increase your segment hosts in increments of at least two.</p>
<p style="text-align: justify; padding-bottom:15px;">So, how is this all coordinated? Greenplum interconnect is the networking layer of the architecture, and manages communication between the Greenplum segments and master host network infrastructure.</p>
<p style="text-align: justify;"><a href="https://scalegrid.io/blog/what-is-greenplum-database-intro-to-the-big-data-database/"><img class="alignnone size-full wp-image-5348" src="https://scalegrid.io/blog/wp-content/uploads/2020/05/Greenplum-Database-Architecture-Diagram-ScaleGrid-Blog.jpg" alt="Greenplum Database Architecture Diagram of Master Host and Segment Hosts - ScaleGrid Blog" width="100%" height="auto" /></a></p>

<h2 style="padding-top: 15px;"><a id="2"></a>Greenplum Advantages</h2>
<p style="text-align: justify;">Here are some of the key Greenplum advantages that can help you improve your database performance:</p>

<ul style="text-align: justify;">
	<li>
<h3 style="padding-top: 10px;">High Performance</h3>
<p style="text-align: justify;">Greenplum has a uniquely designed data pipeline that can efficiently stream data from the disk to the CPU, without relying on the data fitting into RAM memory, as explained in their <a style="color: #2da964;" href="https://greenplum.org/greenplum-next-generation-bigdata-platform-top5/">Greenplum Next Generation Big Data Platform: Top 5 reasons</a> article. This provides Greenplum deployments with a huge performance boost over in-memory systems that need enough memory to store their data, or non-RDBMS based systems that are in-memory processing engines that allocate RAM for each concurrent query. Greenplum’s high performance eliminates the challenge most RDBMS have scaling to petabtye levels of data, as they are able to scale linearly to efficiently process data.</p>
</li>
	<li>
<h3 style="padding-top: 10px;">Query Optimization</h3>
<p style="text-align: justify;">Greenplum features a cost-based query optimizer for large-scale, big data workloads. Tapping into performance as we covered above, Greenplum scales interactive and batch-mode analytics to petabyte scale without degrading your query performance. This allows Greenplum to distribute the load between their different segments and use all of the system's resources parallely to process a query.</p>
<p style="text-align: justify;">Additionally, with OLTP (Online Transactional Processing) workload improvements in <a style="color: #2da964;" href="https://greenplum.org/oltp-workload-performance-improvement-in-greenplum-6/" target="_blank">Greenplum 6</a>, single query performance has improved over 3.5c over Greenplum 5. With this update, Greenplum eliminated a lot of the lock competition so master CPU usage can exceed 90% which improves the performance of the query by improving the hardware performance of the master node.</p>
</li>
	<li>
<h3 style="padding-top: 10px;">Open Source</h3>
<p style="text-align: justify;"><a style="color: #2da964;" href="https://github.com/greenplum-db/gpdb" target="_blank">Greenplum database</a> is an open source data warehouse project based on PostgreSQL’s open source core, allowing users to take advantage of the decades of expert development behind PostgreSQL, along with the targeted customization of Greenplum for big data applications. Greenplum can run on any Linux server, whether it is hosted in the cloud or on-premise, and can run in any environment.</p>
<p style="text-align: justify;">While Greenplum is maintained by a core team of developers with commit rights to the main repository, they are eagerly welcoming new contributors who are experienced with the database to help shape Greenplum’s future. Learn more about getting involved through the <a style="color: #2da964;" href="https://github.com/greenplum-db/gpdb" target="_blank">Greenplum GitHub</a> page.</p>
</li>
	<li>
<h3 style="padding-top: 10px;">Polymorphic Data Storage</h3>
<p style="text-align: justify;">Greenplum’s polymorphic data storage allows you to control the configuration for your table and partition storage with the freedom to execute and compress files within it at any time. This will allow you to design your tables based on the way your specific data is accessed and in turn have a row or column-oriented storage hierarchy.</p>
<p style="text-align: justify;">When you create a table in Greenplum, you can control the <a style="color: #2da964;" href="https://www.youtube.com/watch?v=7r6DArq87ec" target="_blank">orientation</a> with the ability to choose either column-oriented or row oriented data. Column oriented is typically better for full scans, while row oriented is better for small scans or lookups.</p>
</li>
</ul>
<p style="text-align: justify; padding-top:10px;">Greenplum even allows you to create domain-specific data types and functions. Through the use of semi structured data types, which includes XML, HStore and JSON, you have the ability to store and analyze both structured and unstructured data within a database.</p>


<h2 style="padding-top: 10px;"><a id="3"></a>Major Use Cases</h2>
<p style="text-align: justify;">Greenplum provides a <a style="color: #2da964;" href="https://gpdb.docs.pivotal.io/6-5/analytics/overview.html" target="_blank" rel="nofollow">powerful combination</a> of massively parallel processing databases and advanced data analytics which allows it to create a framework for data scientists and architects to make business decisions based on data gathered by artificial intelligence and machine learning. Let’s walk through the top use cases for Greenplum:</p>

<h3 style="padding-top: 10px;">Analytics</h3>
<p style="text-align: justify;">The advanced analytics provided by Greenplum is being used across many verticals, including finance, manufacturing, automotive, government, energy, education, retail, and so on, to address a wide variety of problems. Some of the Greenplum Database analytics capabilities highlighted by <a style="color: #2da964;" href="https://gpdb.docs.pivotal.io/6-5/analytics/overview.html" target="_blank" rel="nofollow">Pivotal</a> include the ability to analyze a multitude of data types, leverage existing SQL knowledge, and train more models in less time by using the MPP architecture.</p>
<p style="text-align: justify;">Additionally, Greenplum provides <a style="color: #2da964;" href="https://greenplum.org/gpdb-sandbox-tutorials/introduction-greenplum-database-analytics/" target="_blank">in-database analytics</a> which allows you to run analytics directly in the database vs. exporting and running your data in an external analytics engine. As a database tailored towards enterprise workloads, this provides the ability needed to explore large data sets along with the high performance achieved by paralleling the analytics across your available segment hosts. You can also leverage a wide range of power analytics tools with Greenplum, including <a style="color: #2da964;" href="http://madlib.incubator.apache.org/" target="_blank">MADlib</a>, <a style="color: #2da964;" href="https://www.r-project.org/about.html" target="_blank">R statistical language</a>, <a style="color: #2da964;" href="https://www.sas.com/en_us/home.html" target="_blank">SAS</a> and <a style="color: #2da964;" href="https://en.wikipedia.org/wiki/Predictive_Model_Markup_Language" target="_blank">Predictive Modeling Markup Language</a> (PMML).</p>
<p style="text-align: justify;">For example, a billion dollar scale Internet Marketing company is using Greenplum advanced analytics to perform <a style="color: #2da964;" href="https://www.slideshare.net/PivotalKorea/greenplum-user-case/6" target="_blank" rel="nofollow">audience profiling</a> to understand who their audience is, what they buy, which networks and devices they use, and where they are geographically located so they can better understand and serve their market.</p>

<h3 style="padding-top: 10px;">Machine Learning</h3>
<p style="text-align: justify;">Greenplum is an excellent database for machine learning - the study of computer algorithms that improve automatically through experience. Apache MADlib is an open source, SQL-based <a style="color: #2da964;" href="https://www.youtube.com/watch?v=1yDn4H4zxtk" target="_blank">machine learning library</a> that runs in-database on Greenplum, as well as PostgreSQL. This combination helps you improve the parallelism, scalability, and predictive accuracy of your Greenplum machine learning deployment. <a style="color: #2da964;" href="https://gpdb.docs.pivotal.io/6-3/analytics/madlib.html" target="_blank" rel="nofollow">Data transformation and feature engineering</a> capabilities are also available through MADlib for machine learning, including descriptive and inferential statistics, pivoting, sessionization and encoding categorical variables.</p>
<p style="text-align: justify;">For example, a Government fraud revenue retention company is leveraging Greenplum machine learning capabilities along with GemFire to perform <a style="color: #2da964;" href="https://www.slideshare.net/PivotalOpenSourceHub/geodesummit-large-scale-fraud-detection-using-gemfire-integrated-with-greenplum" target="_blank" rel="nofollow">large scale fraud detection</a> to prevent identity theft, detecting and retaining $5B annually and processing 8 million cases a day.</p>

<h3 style="padding-top: 10px;">AI</h3>
<p style="text-align: justify;"><a style="color: #2da964;" href="https://www.sas.com/en_us/insights/articles/big-data/artificial-intelligence-machine-learning-deep-learning-and-beyond.html" target="_blank">Artificial intelligence</a> (AI), while similar to machine learning, refers to the broader idea where machines can execute tasks smartly. Greenplum is a great database choice for applications looking to mimic human abilities through smart machines. With Greenplum’s ability to ingest large volumes of data at high speeds, it makes this database a powerful tool for smart applications that need to interact intelligently based on an unlimited number of unique scenarios.</p>
<p style="text-align: justify;">For example, a Telecom company is using Greenplum database AI capabilities for their <a style="color: #2da964;" href="https://www.slideshare.net/PivotalKorea/greenplum-user-case" target="_blank" rel="nofollow">IoT operational reporting system</a> smart sensors to analyze and execute events used for maintenance, security, and operational efficiencies.</p>
<p style="text-align: justify;">So who’s using Greenplum today? <a style="color: #2da964;" href="https://www.appsruntheworld.com/customers-database/products/view/pivotal-greenplum" target="_blank">Greenplum customers</a> include American Express, Walmart, Asurian, Bank of America, and many more across the banking, professional services, media, insurance, healthcare, automotive and retail markets.</p>

<h2 style="padding-top: 10px;">How to Get Started</h2>
<p style="text-align: justify;">As mentioned throughout this post, Greenplum is an open source database so the community version is absolutely free to <a style="color: #2da964;" href="https://greenplum.org/download/" target="_blank">download</a> and use. Greenplum’s small but active <a style="color: #2da964;" href="https://greenplum.org/community/" target="_blank">community</a> welcomes new contributors, accepts feedback, and collaborates with Greenplum evangelists to promote the big data database.</p>
<p style="text-align: justify;">Many organizations leveraging Greenplum are looking for additional support and tools to help their DBAs manage their deployments. Here are the two different database management and support options available for Greenplum:</p>

<h3 style="padding-top: 10px;">ScaleGrid for Greenplum® Database - Open Source Version</h3>
<p style="text-align: justify;"><a style="color: #2da964;" href="https://scalegrid.io/greenplum.html" target="_blank">ScaleGrid for Greenplum® Database</a> is a fully managed solution for the open source version of Greenplum, launching in May 2020. The multi-cloud platform allows you to deploy and manage on AWS, Azure or Google Cloud (coming soon) cloud platforms, or VMware on-premise environments. ScaleGrid provides Greenplum users with the advanced management tools they need to deploy in a single click, automate backups, and scale dynamically with the ability to maintain full super user admin privileges over their open source deployments.</p>

<h3 style="padding-top: 10px;">Pivotal Greenplum - Commercial Version</h3>
<p style="text-align: justify;">Pivotal Greenplum, now <a style="color: #2da964;" href="https://tanzu.vmware.com/greenplum" target="_blank" rel="nofollow">VMware Tanzu</a> is the creator behind the open source database that offers a commercial version of the database to help you deploy and manage Greenplum in the cloud and on-premise. Pivotal Greenplum offers many advantages, such as the ability to maximize uptime, protect data integrity, and handle streaming data and cloud data with ease.</p>
<p style="text-align: justify; padding-bottom:20px;">Both ScaleGrid and Pivotal Greenplum offer advanced support packages to help your DBA’s optimize their Greenplum deployments.</p>