使用CREATE TABLE在BigQuery中进行聚类 [英] Clustering in BigQuery using CREATE TABLE
本文介绍了使用CREATE TABLE在BigQuery中进行聚类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
不确定我是否正确群集.基本上我正在查看50个客户的GCP结算信息.每个客户都有一个Billing_ID,我在该billing_ID上聚类.我将群集表用于Data Studio仪表板
Unsure if I cluster correctly. Basicly I am looking at GCP Billing Info of say 50 clients. Each client has a Billing_ID and I cluster on that billing_ID. I use the clustered table for a data studio dashboard
请参阅下面的SQL查询以了解我现在所做的事情
See the the SQL query below to see what I do right now
CREATE OR REPLACE TABLE `dashboardgcp`
PARTITION BY DATE(usage_start_time)
CLUSTER BY billing_account_id
AS
SELECT
*
FROM
`datagcp`
WHERE
usage_start_time BETWEEN TIMESTAMP('2019-01-01')
AND TIMESTAMP(CURRENT_DATE)
它成功地像这样集群了,我只是查询性能没有明显提高!
It is succesfully clustered like this, I am just not a noticeable query performance increase!
推荐答案
因此,我认为通过将它与billing_ID集群在一起,我应该会看到仪表板性能的提高
So I thought by clustering it with billing_ID I should see an increase in dashboard performance
请考虑以下几点:
查看全文