gpt4 book ai didi

sql - DISTRIBUTE BY Greenplum 中的通知

转载 作者:行者123 更新时间:2023-12-02 21:34:50 24 4
gpt4 key购买 nike

假设我在 psql 上运行以下查询:

> select a.c1, b.c2 into temp_table from db.A as a inner join db.B as b 
> on a.x = b.x limit 10;

我收到以下消息:

NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column(s) named 'c1' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.

  1. 什么是 DISTRIBUTED BY 列?
  2. temp_table 存储在哪里?它是存储在我的客户端还是服务器上?

最佳答案

  1. DISTRIBUTED BY 是 Greenplum 确定哪个段将存储每一行​​的方式。因为 Greenplum 是大多数生产数据库中的 MPP 数据库,所以您将拥有多个段服务器。您要确保 Distribution 列是您将在平时加入的列。

  2. temp_table 是将在 Greenplum 集群上为您创建的表。如果您没有将 search_path 设置为其他内容,它将位于公共(public)架构中。

关于sql - DISTRIBUTE BY Greenplum 中的通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21636742/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com