bigquery数据类型

I’ve used BigQuery every day with small and big datasets querying tables, views, and materialized views. During this time I’ve learned some things, I would have liked to know since the beginning. The goal of this article is to give you some tips and recommendations for optimizing your costs and performance.

我每天都使用BigQuery处理大小数据集,用于查询表,视图和实例化视图。 在这段时间里,我学到了一些东西,从一开始我就想知道。 本文的目的是为您提供一些技巧和建议,以优化成本和性能。

基本概念 (Basic concepts)

BigQuery: Serverless, highly scalable, and cost-effective multi-cloud data warehouse designed for business agility [Google Cloud doc].

BigQuery :专为业务敏捷性而设计的无服务器,高度可扩展且经济高效的多云数据仓库[ Google Cloud doc ]。

BigQuery logo
BigQuery徽标

GCP Project: Google Cloud projects form the basis for creating, enabling, and using all Google Cloud services including managing APIs, enabling billing, adding and removing collaborators, and managing permissions for Google Cloud resources [Google Cloud doc]. Each project could have more than one BigQuery Dataset.

GCP项目 :Google Cloud项目构成了创建,启用和使用所有Google Cloud服务的基础,包括管理API,启用计费,添加和删除协作者以及管理Google Cloud资源的权限[ Google Cloud文档 ]。 每个项目可能有多个BigQuery数据集。

GCP Project
GCP项目

Dataset: It’s similar to the Databases or Schema concepts in other RDBMS. There are located tables, views, and materialized views.

数据集 :它类似于其他RDBMS中的数据库或架构概念。 存在表,视图和实例化视图。

BigQuery’s Datasets
BigQuery的数据集

Slot: It’s a virtual CPU used by BigQuery to execute SQL queries. BigQuery automatically calculates how many slots are required by each query, depending on query size and complexity [Google Cloud doc]. This is the principal indicator if you are in flat-rate pricing because you make a slot commitment (minimum 500 slots).

插槽:这是BigQuery用于执行SQL查询的虚拟CPU。 BigQuery会根据查询的大小和复杂程度自动计算每个查询需要多少个广告位[ Google Cloud doc ]。 如果您采用固定费用定价,因为这是您承诺的广告位承诺(最少500个广告位),则这是主要指标。

Slot/ms: It’s the total amount of slots per millisecond used by a query. That’s the total number of slots consumed by the query over its entire execution time [Taking a practical approach to BigQuery slot usage analysis]. Notice that a query uses a different quantity of slots during all execution, for example, the number of slots when start making a join is higher than making a filter and also is the duration time.

插槽/毫秒:这是查询使用的每毫秒的插槽总数。 这是查询在整个执行时间内所消耗的插槽总数[ 采用实用的方法进行BigQuery插槽使用率分析 ]。 请注意,查询在所有执行过程中使用不同数量的插槽,例如,开始建立连接时的插槽数量要比创建过滤器的数量高,并且持续时间也要多。

Numer of byte processed: It’s the total bytes read when you run a query. This is the principal cost if you are in on-demand pricing.

已处理字节数 :运行查询时读取的总字节数。 如果您按需定价,这是主要成本。

Getaway of “Select * “
逃脱“选择*”

Partition: A partitioned table is a special table that is divided into segments, called partitions, that make it easier to manage and query your data [BigQuery partitioned table].

分区 :分区表是一种特殊的表,分为几部分,称为分区,这使管理和查询数据更加容易[ BigQuery分区表 ]。

A partitioned and clustered table
分区和集群表

Clustering: A clustered table data is automatically organized based on the contents of one or more columns in the table’s schema [BigQuery clustered table].

集群 :集群表数据是根据表架构[ BigQuery集群表 ]中一个或多个列的内容自动组织的。

Resuming this two important concepts, I’ve made a simple image to understand visually how a table get organized.

总结这两个重要概念,我制作了一个简单的图像以直观地了解表的组织方式。

费用建议 (Cost recommendations)

There is not a magic recipe, however, It’s important to understand the BigQuery’s cost structure and then what exactly I’m spending on it.

但是,这并不是一个神奇的秘诀,重要的是要了解BigQuery的成本结构,然后确切地讲我要花多少钱。

Cost Structure

成本结构

  1. Storage [pricing]

    储存 [ 定价 ]

  • Active: A monthly charge for data stored in tables or in partitions that have been modified in the last 90 days. $0.020 per GB

    活跃:按月收费,用于存储在过去90天内已修改的表或分区中的数据。 每GB $ 0.020

  • Long-term: A lower monthly charge for data stored in tables or in partitions that have not been modified in the last 90 days. $0.010 per GB

    长期:对于过去90天内未修改的表或分区中存储的数据,每月收取的费用较低。 每GB $ 0.010

bigquery数据类型_将BigQuery与TB数据一起使用后的成本和性能课程相关推荐

  1. datetime数据类型_当pandas遇上数据类型问题

    原文:Overview of Pandas Data Types作者:Chris Moffitt链接: https://pbpython.com/pandas_dtypes.html译者: 大邓 当我 ...

  2. bigquery数据类型_bigquery解释了查询您的数据

    bigquery数据类型 Previously in BigQuery Explained, we reviewed BigQuery architecture, storage management ...

  3. bigquery 教程_bigquery挑战实验室教程从数据中获取见解

    bigquery 教程 This medium article focusses on the detailed walkthrough of the steps I took to solve th ...

  4. 语言转4字节数据整型_R语言与RGui平台_数据类型_向量_4

    计算机语言RGui平台上的R语言__数据类型_向量_4 R语言进阶4_数据类型_向量1 咱们而可以从自然语言(汉语.英.法.俄.德.日.拉丁.伊斯兰.等等)的基本特征来看--词汇.句子.段落.结构.文 ...

  5. elasticsearch 数据类型_基于 MySQL Binlog 的 Elasticsearch 数据同步实践

    来源;马蜂窝 一.背景 随着马蜂窝的逐渐发展,我们的业务数据越来越多,单纯使用 MySQL 已经不能满足我们的数据查询需求,例如对于商品.订单等数据的多维度检索. 使用 Elasticsearch 存 ...

  6. tb计算机存储单位_如何节省数TB的云存储

    tb计算机存储单位 Whatever cloud provider a company may use, costs are always a factor that influences decis ...

  7. 白裤子变粉裤子怎么办_使用裤子构建构建数据科学的monorepo

    白裤子变粉裤子怎么办 At HousingAnywhere, one of the first major obstacles we had to face when scaling the Data ...

  8. 数据预处理 泰坦尼克号_了解泰坦尼克号数据集的数据预处理

    数据预处理 泰坦尼克号 什么是数据预处理? (What is Data Pre-Processing?) We know from my last blog that data preprocessi ...

  9. 什么事数据科学_如果您想进入数据科学,则必须知道的7件事

    什么事数据科学 No way. No freaking way to enter data science any time soon-That is exactly what I thought a ...

最新文章

  1. 【复盘】如何培养小朋友的编程能力?
  2. SAP复合角色更改后扩展到派生节点
  3. boost::geometry::detail::get_turns用法的测试程序
  4. CNN结构基元:纹理结构和纹理基元方程化GLOH、Gabor...(Code)
  5. centos6.4下安装jdk
  6. dotnet 在 UOS 国产系统上使用 Xamarin Forms 创建 xaml 界面的 GTK 应用
  7. SpringBoot 实现Session共享
  8. Scrum联盟的新任全球营销副总裁访谈
  9. java 生成条形码_Springboot生成二维码,怎么搞?
  10. 警告解决办法:class xxxx has virtual method but non-virtual destructor
  11. 使用 WebView2 封装一个生成 PDF 的 WPF 控件
  12. java lbs云_LBSyuncunchudemo 一个使用百度地图API,利用LBS云存储云检索的代码,可以测试 。 Java Develop 238万源代码下载- www.pudn.com...
  13. 笔记本什么都没开,风扇为什么一直转?——CDPUserSvc服务
  14. Leetcode0720. 词典中最长的单词(simple)
  15. 什么是字节对齐,为什么需要字节对齐
  16. WordBias | 可视化文本中的偏见(刻板印象)
  17. Linux —— 基础开发工具的基本使用 —— yum、vim、gcc、make和makefile,gdb的简单应用
  18. 基于Linux RHEL 5 5 安装Oracle 10g RAC
  19. 为什么大家都用美颜SDK进行拍摄?美颜SDK未来的发展方向是什么?
  20. 利用500万条微博语料对微博评论进行情感分析

热门文章

  1. linux 下source命令
  2. 计算机网络【3】网络层
  3. 信道分配 以太网
  4. 【Java】字符串转换为数字:Integer的parseInt方法
  5. java排列组合算法优缺点,一招彻底弄懂!
  6. Java面试题中高级,java引用数据类型和基本数据类型区别
  7. 【干货】mysql查询重复数据sql
  8. Django框架是什麼?
  9. 多亏了这篇文章,我的开发效率远远领先于我的同事
  10. 玩转CSS3(一)----CSS3实现页面布局