BigQuery类型中有多少个字节

编程入门 行业动态 更新时间:2024-10-28 14:30:49
本文介绍了BigQuery类型中有多少个字节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

BigQuery中以下类型占用多少字节:

How many bytes do the following types take up in BigQuery:

  • 时间戳
  • 约会时间
  • 日期

我的猜测是日期可以存储为2个字节,时间戳可以存储8个,但是我不确定,因此 cloud.google/bigquery/docs/reference/standard-sql/data-types 页

My guess was that date could be stored in 2 bytes, and a timestamp perhaps 8, but I wasn't sure about that and it is not mentioned on the cloud.google/bigquery/docs/reference/standard-sql/data-types page.

推荐答案

BigQuery数据类型的大小如下:

The size of BigQuery's data types is as follows:

Data type Size INT64/INTEGER 8 bytes FLOAT64/FLOAT 8 bytes NUMERIC 16 bytes BOOL/BOOLEAN 1 byte STRING 2 bytes + the UTF-8 encoded string size BYTES 2 bytes + the number of bytes in the value DATE 8 bytes DATETIME 8 bytes TIME 8 bytes TIMESTAMP 8 bytes STRUCT/RECORD 0 bytes + the size of the contained fields GEOGRAPHY 16 bytes + 24 bytes * the number of vertices in the geography type (you can verify the number of vertices using the ST_NumPoints function)

任何数据类型的空值都将计算为0个字节.

Null values for any data type are calculated as 0 bytes.

将重复的列存储为数组,并计算大小基于值的数量.例如,整数列(INT64)计算重复(ARRAY)并包含4个条目为32个字节(4个条目x 8个字节).

A repeated column is stored as an array, and the size is calculated based on the number of values. For example, an integer column (INT64) that is repeated (ARRAY) and contains 4 entries is calculated as 32 bytes (4 entries x 8 bytes).

在数据大小计算部分中查看更多详细信息://cloud.google/bigquery/pricing"rel =" noreferrer>定价文档

See more details in Data size calculation section of Pricing documentation

更多推荐

BigQuery类型中有多少个字节

本文发布于:2023-10-20 13:09:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1511062.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中有   字节   多少个   类型   BigQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!