TABLE_STORAGE_BY_ORGANIZATION view
TheINFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATION view contain one row foreach table or materialized view for the whole organization associated with thecurrent project.
The data in this table is not kept in real time, and might bedelayed by a few seconds to a few minutes. Storage changes that are caused bypartition or table expiration alone, or that are caused by modifications to thedataset time travel window, might take up to a day to be reflected in theINFORMATION_SCHEMA.TABLE_STORAGE view. In cases of dataset deletion wherethe dataset contains more than 1,000 tables, this view won't reflect thechange until thetime travel window for the deleteddataset has passed.
The table storage views give you a convenient way to observe your currentstorage consumption, and in addition provide details on whether yourstorage uses logical uncompressed bytes, physical compressed bytes, ortime travel bytes. This information can help you with tasks like planning forfuture growth and understanding the update patterns for tables.
Data included in the*_BYTES columns
The*_BYTES columns in the table storage views include information about youruse of storage bytes. This information is determined by looking at your storageusage for materialized views and the following types of tables:
- Permanent tables created through any of the methods described inCreate and use tables.
- Temporary tables created insessions. These tables are placed into datasets with generated names like "_c018003e063d09570001ef33ae401fad6ab92a6a".
- Temporary tables created inmulti-statement queries("scripts"). These tables are placed into datasets with generated names like "_script72280c173c88442c3a7200183a50eeeaa4073719".
Data stored in thequery results cacheis not billed to you and so is not included in the*_BYTES column values.
Clones and snapshots show*_BYTES column values as if they were completetables, rather than showing the delta from the storage used by the base table,so they are an over-estimation. Your bill does account correctly for this deltain storage usage. For more information on the delta bytes stored and billed by clones andsnapshots, see theTABLE_STORAGE_USAGE_TIMELINEview.
Forecast storage billing
In order to forecast the monthly storage billing for a dataset, you can useeither thelogical orphysical *_BYTES columns in this view, dependingon thedataset storage billing modelused by the dataset. Please note that this is only a rough forecast, andthe precise billing amounts are calculated based on the usage byBigQuery storage billing infrastructure and visible inCloud Billing.
For datasets that use a logical billing model, you can forecast your monthlystorage costs as follows:
((ACTIVE_LOGICAL_BYTES value /POW(1024, 3)) * active logical bytes pricing) +((LONG_TERM_LOGICAL_BYTES value /POW(1024, 3)) * long-term logical bytes pricing)
TheACTIVE_LOGICAL_BYTES value for a table reflects the active bytescurrently used by that table.
For datasets that use a physical billing model, you can forecast your storagecosts as follows:
((ACTIVE_PHYSICAL_BYTES + FAIL_SAFE_PHYSICAL_BYTES value /POW(1024, 3)) * active physical bytes pricing) +((LONG_TERM_PHYSICAL_BYTES value /POW(1024, 3)) * long-term physical bytes pricing)
TheACTIVE_PHYSICAL_BYTES value for a table reflects the active bytescurrently used by that table plus the bytes used for time travel for that table.
To see the active bytes of the table alone, subtract theTIME_TRAVEL_PHYSICAL_BYTES value from theACTIVE_PHYSICAL_BYTES value.
For more information, seeStorage pricing.
Required permissions
To query theINFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATION view, you need the followingIdentity and Access Management (IAM) permissions for your organization:
bigquery.tables.getbigquery.tables.list
Each of the following predefined IAM roles includes the precedingpermissions:
roles/bigquery.adminroles/bigquery.dataViewerroles/bigquery.dataEditorroles/bigquery.metadataViewer
This schema view is only available to users with definedGoogle Cloudorganizations.
For more information about BigQuery permissions, seeAccess control with IAM.
Schema
TheINFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATION view has the following schema:
| Column name | Data type | Value |
|---|---|---|
project_id | STRING | The project ID of the project that contains the dataset. |
project_number | INT64 | The project number of the project that contains the dataset. |
table_catalog | STRING | The project ID of the project that contains the dataset. |
table_schema | STRING | The name of the dataset that contains the table or materialized view, also referred to as thedatasetId. |
table_name | STRING | The name of the table or materialized view, also referred to as thetableId. |
creation_time | TIMESTAMP | The creation time of the table. |
total_rows | INT64 | The total number of rows in the table or materialized view. |
total_partitions | INT64 | The number of partitions present in the table or materialized view. Unpartitioned tables return 0. |
total_logical_bytes | INT64 | Total number of logical (uncompressed) bytes in the table or materialized view. |
active_logical_bytes | INT64 | Number of logical (uncompressed) bytes that are younger than 90 days. |
long_term_logical_bytes | INT64 | Number of logical (uncompressed) bytes that are older than 90 days. |
current_physical_bytes | INT64 | Total number of physical bytes for the current storage of the table across all partitions. |
total_physical_bytes | INT64 | Total number of physical (compressed) bytes used for storage, including active, long-term, and time travel (deleted or changed data) bytes. Fail-safe (deleted or changed data retained after the time-travel window) bytes aren't included. |
active_physical_bytes | INT64 | Number of physical (compressed) bytes younger than 90 days, including time travel (deleted or changed data) bytes. |
long_term_physical_bytes | INT64 | Number of physical (compressed) bytes older than 90 days. |
time_travel_physical_bytes | INT64 | Number of physical (compressed) bytes used by time travel storage (deleted or changed data). |
storage_last_modified_time | TIMESTAMP | The most recent time that data was written to the table. ReturnsNULL if no data exists. |
deleted | BOOLEAN | Indicates whether or not the table is deleted. |
table_type | STRING | The type of table. For example,BASE TABLE. |
managed_table_type | STRING | This column is in Preview. The managed type of the table. For example,NATIVE orBIGLAKE. |
fail_safe_physical_bytes | INT64 | Number of physical (compressed) bytes used by the fail-safe storage (deleted or changed data). |
last_metadata_index_refresh_time | TIMESTAMP | The last metadata index refresh time of the table. |
table_deletion_reason | STRING | Table deletion reason if thedeleted field is true. The possible values are as follows:
|
table_deletion_time | TIMESTAMP | The deletion time of the table. |
For stability, we recommend that you explicitly list columns in your information schema queries instead ofusing a wildcard (SELECT *). Explicitly listing columns prevents queries frombreaking if the underlying schema changes.
Scope and syntax
Queries against this view must include aregion qualifier.The following table explains the region scope for this view:
| View name | Resource scope | Region scope |
|---|---|---|
[`PROJECT_ID`.]`region-REGION`.INFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATION | Organization that contains the specified project | REGION |
- Optional:
PROJECT_ID: the ID of your Google Cloud project. If not specified, the default project is used. REGION: anydataset region name. For example,`region-us`.Note: You must usea region qualifier to query
INFORMATION_SCHEMAviews. The location of the query execution must match the region of theINFORMATION_SCHEMAview.
The following example shows how to return storage information for tables in aspecified project in an organization:
SELECT*FROM`myProject`.`region-REGION`.INFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATION;The following example shows how to return storage information by project fortables in an organization:
SELECT*FROM`region-REGION`.INFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATION;Example
The following example shows you which projects in an organizationare currently using the most storage.
SELECTproject_id,SUM(total_logical_bytes)AStotal_logical_bytesFROM`region-REGION`.INFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATIONGROUPBYproject_idORDERBYtotal_logical_bytesDESC;
The result is similar to the following:
+---------------------+---------------------+| project_id | total_logical_bytes |+---------------------+---------------------+| projecta | 971329178274633 |+---------------------+---------------------+| projectb | 834638211024843 |+---------------------+---------------------+| projectc | 562910385625126 |+---------------------+---------------------+
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.