表:
create table tst
(
id numbernot null,
region number not null,
txtvarchar(30)not null
)
partition by range(region)
(
partition part_01 values less than (1000) tablespace TEST,
partition part_02 values less than (2000) tablespace tst
);
create index idx_part_id on niegc_part(region)
local
(
partition idx_1 tablespace dw1,
partition idx_2 tablespace dw2
)
视图:
create view v_tst
as
select * from tst;
1、select * from v_tst where region =123;能否用上索引?
我的表和表分区的结构都是固定是不允许我修改的并且我只能从视图中查询数据,
我唯一可以改的就是能修改索引
2、我的索引应该怎么建合理(在没有用上表分区的情况下)?
3、视图上查询能否用上索引,能否用上表分区?视图与索引,普通索引与索引分区中的全局索引和局部索引都是什么关系?
综上:如何建索引更合理?