|
我有下面几个最近遇到的具体的问题,希望作者解答
1.分区内并行对查询的帮助大否
2.如果没有创建索引或主键,是否会导致很差的执行计划,比如下面的查询
select
s_acctbal,
s_name,
n_name,
p_partkey,
p_mfgr,
s_address,
s_phone,
s_comment
from
tpch.part,
tpch.supplier,
tpch.partsupp,
tpch.nation,
tpch.region
where
p_partkey = ps_partkey
and s_suppkey = ps_suppkey
and p_size = 9
and p_type like '%TIN'
and s_nationkey = n_nationkey
and n_regionkey = r_regionkey
and r_name = 'MIDDLE EAST'
and ps_supplycost = (
select
min(ps_supplycost)
from
tpch.partsupp,
tpch.supplier,
tpch.nation,
tpch.region
where
p_partkey = ps_partkey
and s_suppkey = ps_suppkey
and s_nationkey = n_nationkey
and n_regionkey = r_regionkey
and r_name = 'MIDDLE EAST'
)
ORDER BY s_acctbal desc,
n_name,
s_name,
p_partkey ASC
fetch first 100 rows only;
3.clpplus中怎么才能使%和$符号不被替换? |
|