Unreasonable problem: the performance of a simple statement of greenplum is much lower than that of postgresql?.

GreenPlum environment: 1 master host (memory: 16G), 2 segment host (2 segments, memory: 16G), version: 5.3.0
postgresql environment: 1 (hardware configuration with GreenPlum), version: 8.3.23

Table: alert_log_sm_http is the same size as gp in pg, with 5000000 rows and ID as the primary key index.

the running result is as follows:
PG:

GP:

question:
running time is too different, respectively: PG:0.056ms,GP:1974.565ms. From the analysis results of explain, it takes too much time for segmet to scan the full table.
how can a problem like this be solved?

Mar.02,2021

Greenplum disable Index Scan, by default and try to open it.

set enable_indexscan = on;

for small amounts of data and simple queries, it is normal for Greenplum's distributed architecture to be slower than stand-alone Postgresql. Distributed transactions, query plan distribution and so on will bring a lot of fixed time overhead.


you can use the modified version of Deepgreen, based on GreenPlum4 to improve the query performance of SQL. It is also open source.


if you need multiple Synchronize data, this Synchronize is very expensive, especially across hosts and networks.
I hope I can give you some reference

  • Greenplumn failed to build index: No space left on device

    when you look at the error prompt, it feels like there is not enough space, but it is not. 5 machines each have 20T disks, each with 8T left. But every time the index is created for about a day or so, an error will be reported. error log is as follows...

    Mar.04,2021
  • Greenplum character type

    recently, the problems encountered in learning greenplum, before testing are as follows: 1.character varying(80):value too long for type character varying(80); 2.gpfdist; 3.delimiter.so; I don t know how to solve the first problem first ...

    Mar.10,2021
  • Greenplum failed to start, cdbtm.c:1529

    problem description failure at startup after greenplum installation is completed prompt: DTM initialization: failure during startup recovery, retry failed, check segment status (cdbtm.c:1529) the platform version of the problem and what methods you...

    May.10,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bf01-2c300.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bf01-2c300.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?