Database Reference
In-Depth Information
If you have two tables with the same number of rows and columns but
different data but you are charged different amounts for querying them, this
could lead to confusion. Moreover, if you went from highly compressible
data to less-compressible data, you'd likely be surprised if you started
getting charged more. Furthermore, because compression ratios can be
influenced by ordering, if BigQuery moves data around and gets better or
worse compression, you'd likely be surprised if the cost for querying the
same data changed over time.
The byte cost of the data is related to the type of the data. Table 7.3 shows
the column data type and the number of bytes that are charged:
Table 7.3 Bytes Charged by Column Type
Type
Number of Bytes
8
INTEGER
8
FLOAT
TIMESTAMP 8
1
BOOLEAN
Length of the string encoded as UTF-8 + 2 bytes
STRING
0 (see RECORD fields in the following list)
RECORD
In addition to the type-based byte count, following are some other rules for
the byte cost calculation:
NULL fields are considered size 0. That is, any NULL value in any field is
“free.”
RECORD fields—that is, fields that have nested data—do not add to the
cost. However, any field referenced inside the record counts normally
toward the query cost.
• Repeated fields are billed as the sum of the cost of each of the repeated
values. That is, if you have an integer that is repeated 10 times, you are
charged for 80 bytes. If the repeated value count is 0, you are not
charged for any bytes consumed.
The byte count used for query billing calculation is the same as the byte
count used for storage; that is, you will be billed for storing all the columns
in the table based on the same type-based byte count that is used for queries.
 
 
Search WWH ::




Custom Search