The performance of Greenplum Database depends on the hardware and IT infrastructure on which it runs. Greenplum Database is comprised of several servers (hosts) acting together as one cohesive system (array); as a first step in diagnosing performance problems, ensure that all Greenplum Database segments are online. Greenplum Database's performance will be as fast as the slowest host in the array. Problems with CPU utilization, memory management, I/O processing, or network load affect performance. Common hardware-related issues are:
See the Greenplum Database Reference Guide for information about checking database object sizes and disk space.
A database system has a limited CPU capacity, memory, and disk I/O resources. When multiple workloads compete for access to these resources, database performance suffers. Resource management maximizes system throughput while meeting varied business requirements. Greenplum Database provides resource queues and resource groups to help you manage these system resources.
Resource queues and resource groups limit resource usage and the total number of
concurrent queries executing in the particular queue or group. By assigning database roles
to the appropriate queue or group, administrators can control concurrent user queries
and prevent system overload. For more information about resource queues and resource
groups, including selecting the appropriate scheme for your Greenplum Database environment,
see
Greenplum Database administrators should run maintenance workloads such as
data loads and
Contention arises when multiple users or workloads try to use the system in a conflicting way; for example, contention occurs when two transactions try to update a table simultaneously. A transaction that seeks a table-level or row-level lock will wait indefinitely for conflicting locks to be released. Applications should not hold transactions open for long periods of time, for example, while waiting for user input.
Greenplum Database uses a cost-based query optimizer that relies on database
statistics. Accurate statistics allow the query optimizer to better estimate the number of
rows retrieved by a query to choose the most efficient query plan. Without database
statistics, the query optimizer cannot estimate how many records will be returned. The
optimizer does not assume it has sufficient memory to perform certain operations such as
aggregations, so it takes the most conservative action and does these operations by reading
and writing from disk. This is significantly slower than doing them in memory.
Before you interpret a query plan for a query using
See
The following configuration parameters control the amount of data sampled for statistics collection:
These parameters control statistics sampling at the system level. It is better to sample only increased statistics for columns used most frequently in query predicates. You can adjust statistics for a particular column using the command:
For example:
This is equivalent to changing
When you create a table in Greenplum Database, you must declare a distribution key that allows for even data distribution across all segments in the system. Because the segments work on a query in parallel, Greenplum Database will always be as fast as the slowest segment. If the data is unbalanced, the segments that have more data will return their results slower and therefore slow down the entire system.
Many performance issues can be improved by database design. Examine your database design and consider the following:
To help optimize database design, review the maximum limits that Greenplum Database supports:
Dimensions listed as unlimited are not intrinsically limited by Greenplum Database. However, they are limited in practice to available disk space and memory/swap space. Performance may suffer when these values are unusually large.
There is a maximum limit on the number of objects (tables