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.get
  • bigquery.tables.list

Each of the following predefined IAM roles includes the precedingpermissions:

  • roles/bigquery.admin
  • roles/bigquery.dataViewer
  • roles/bigquery.dataEditor
  • roles/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 nameData typeValue
project_idSTRINGThe project ID of the project that contains the dataset.
project_numberINT64The project number of the project that contains the dataset.
table_catalogSTRINGThe project ID of the project that contains the dataset.
table_schemaSTRINGThe name of the dataset that contains the table or materialized view, also referred to as thedatasetId.
table_nameSTRINGThe name of the table or materialized view, also referred to as thetableId.
creation_timeTIMESTAMPThe creation time of the table.
total_rowsINT64The total number of rows in the table or materialized view.
total_partitionsINT64The number of partitions present in the table or materialized view. Unpartitioned tables return 0.
total_logical_bytesINT64Total number of logical (uncompressed) bytes in the table or materialized view.
active_logical_bytesINT64Number of logical (uncompressed) bytes that are younger than 90 days.
long_term_logical_bytesINT64Number of logical (uncompressed) bytes that are older than 90 days.
current_physical_bytesINT64Total number of physical bytes for the current storage of the table across all partitions.
total_physical_bytesINT64Total 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_bytesINT64Number of physical (compressed) bytes younger than 90 days, including time travel (deleted or changed data) bytes.
long_term_physical_bytesINT64Number of physical (compressed) bytes older than 90 days.
time_travel_physical_bytesINT64Number of physical (compressed) bytes used by time travel storage (deleted or changed data).
storage_last_modified_timeTIMESTAMPThe most recent time that data was written to the table. ReturnsNULL if no data exists.
deletedBOOLEANIndicates whether or not the table is deleted.
table_typeSTRINGThe type of table. For example,BASE TABLE.
managed_table_typeSTRINGThis column is in Preview. The managed type of the table. For example,NATIVE orBIGLAKE.
fail_safe_physical_bytesINT64Number of physical (compressed) bytes used by the fail-safe storage (deleted or changed data).
last_metadata_index_refresh_timeTIMESTAMPThe last metadata index refresh time of the table.
table_deletion_reasonSTRINGTable deletion reason if thedeleted field is true. The possible values are as follows:
  • TABLE_EXPIRATION: table deleted after set expiration time
  • DATASET_DELETION: dataset deleted by user
  • USER_DELETED: table was deleted by user
table_deletion_timeTIMESTAMPThe 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 nameResource scopeRegion scope
[`PROJECT_ID`.]`region-REGION`.INFORMATION_SCHEMA.TABLE_STORAGE_BY_ORGANIZATIONOrganization that contains the specified projectREGION
Replace the following:
  • 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 queryINFORMATION_SCHEMA views. The location of the query execution must match the region of theINFORMATION_SCHEMA view.

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.