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
Query to check the degree of parallelism on a table
提问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_metadata
is 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_TABLES
or DBA_TABLES
rather than USER_TABLES
and add a predicate on the OWNER
column.
假设您拥有该表,它将起作用。否则,根据您的权限,使用ALL_TABLES
orDBA_TABLES
而不是USER_TABLES
并在OWNER
列上添加谓词。