SQL 查询以检查表的并行度

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14345105/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 13:09:21  来源:igfitidea点击:

Query to check the degree of parallelism on a table

sqloracleoracle10g

提问by Woot4Moo

How does one query an Oracle 10g database to determine the degree of parallelism for a table? My searches have proved fruitless. I would anticipate it is something like this:

如何查询 Oracle 10g 数据库以确定表的并行度?事实证明,我的搜索毫无结果。我预计它是这样的:

select degree   
from table_metadata

where table_metadatais metadata about my table.

table_metadata关于我的表的元数据在哪里。

Since parallelism seems to be unknown consider the following statement:

由于并行性似乎未知,请考虑以下语句:

create table  foo  
...  
parallel (8);  

Here parallel (8)sets the degree of parallelism to 8

这里parallel (8)将并行度设置为 8

回答by Justin Cave

SELECT degree
  FROM user_tables
 WHERE table_name = <<some table name>>

will work assuming that you own the table. Otherwise, depending on your privileges, either use ALL_TABLESor DBA_TABLESrather than USER_TABLESand add a predicate on the OWNERcolumn.

假设您拥有该表,它将起作用。否则,根据您的权限,使用ALL_TABLESorDBA_TABLES而不是USER_TABLES并在OWNER列上添加谓词。