

 Amazon Redshift 將不再支援從修補程式 198 開始建立新的 Python UDFs。現有 Python UDF 將繼續正常運作至 2026 年 6 月 30 日。如需詳細資訊，請參閱[部落格文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# SVV\$1TABLE\$1INFO
<a name="r_SVV_TABLE_INFO"></a>

顯示目前連線資料庫中資料表和具體化視觀表的摘要資訊。檢視會篩選掉系統資料表，並且僅顯示至少包含 1 列資料的使用者定義資料表和具體化視觀表。

您可以使用 SVV\$1TABLE\$1INFO 檢視來診斷和解決可能影響查詢效能的資料表設計問題。這包括壓縮編碼、分散索引鍵、排序樣式、資料分散扭曲、資料表大小和統計資料的問題。SVV\$1TABLE\$1INFO 檢視不會傳回空資料表的任何資訊。

SVV\$1TABLE\$1INFO 檢視會摘要來自下列系統資料表和目錄資料表的資訊：
+  [STV\$1NODE\$1STORAGE\$1CAPACITY](r_STV_NODE_STORAGE_CAPACITY.md) 
+  [STV\$1SLICES](r_STV_SLICES.md) 
+  [STV\$1TBL\$1PERM](r_STV_TBL_PERM.md) 
+  [PG\$1ATTRIBUTE](https://www.postgresql.org/docs/8.0/static/catalog-pg-attribute.html) 
+  [PG\$1CLASS](https://www.postgresql.org/docs/8.0/static/catalog-pg-class.html) 
+  [PG\$1DATABASE](https://www.postgresql.org/docs/8.0/static/catalog-pg-database.html) 
+  [PG\$1NAMESPACE](https://www.postgresql.org/docs/8.0/static/catalog-pg-namespace.html) 
+  [PG\$1STATISTIC\$1INDICATOR](r_PG_STATISTIC_INDICATOR.md) 

只有超級使用者才能看到 SVV\$1TABLE\$1INFO。如需詳細資訊，請參閱[系統資料表和檢視中資料的可見性](cm_chap_system-tables.md#c_visibility-of-data)。若要允許使用者查詢檢視，請將 SVV\$1TABLE\$1INFO 上的 SELECT 許可授予給使用者。

## 資料表欄
<a name="SVV_TABLE_INFO-table-columns"></a>

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/redshift/latest/dg/r_SVV_TABLE_INFO.html)

## 範例查詢
<a name="SVV_TABLE_INFO-sample-queries"></a>

下列範例顯示資料庫中所有使用者定義資料表的編碼、分佈樣式、排序和資料扭曲。此處的 "table" 必須使用雙引號括起來，因為這是保留字。

```
select "table", encoded, diststyle, sortkey1, skew_sortkey1, skew_rows
from svv_table_info
order by 1;

table          | encoded | diststyle       | sortkey1     | skew_sortkey1 | skew_rows
---------------+---------+-----------------+--------------+---------------+----------
category       | N       | EVEN            |              |               |          
date           | N       | ALL             | dateid       |          1.00 |          
event          | Y       | KEY(eventid)    | dateid       |          1.00 |      1.02
listing        | Y       | KEY(listid)     | dateid       |          1.00 |      1.01
sales          | Y       | KEY(listid)     | dateid       |          1.00 |      1.02
users          | Y       | KEY(userid)     | userid       |          1.00 |      1.01
venue          | N       | ALL             | venueid      |          1.00 |          
(7 rows)
```