我在Windows Server 2003上安装了oracle 10g.我在单个表中有22,000,000条记录,这是一个事务表,
增加了同一个表中的记录.每月50,000.
我的问题是,每当我对它运行查询时,我的查询总是太慢.有没有什么方法可以提高查询的性能,比如分区表还是其他方法?
select a.prd_code
, a.br_code||'-'||br_title
, a.size_code||'-'||size_title
,size_in_gms
, a.var_code||'-'||var_title
, a.form_code||'-'||form_title
, a.pack_code||'-'||pack_title
, a.pack_type_code||'-'||pack_type_title
, start_date
, end_date
, a.price
from prices a
, brand br
, (select distinct prd_code
, br_code
, size_code
, var_code
, form_code
,packing_code
, pack_type_code
from cphistory
where prd_code = '01'
and flag = 'Y'
and project_yy = '2009' and '01' and '10') cp
, (select prd_code
, br_code
, size_code
, size_in_gms
from sizes
where …Run Code Online (Sandbox Code Playgroud)