You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Suresh Subbiah (JIRA)" <ji...@apache.org> on 2017/04/03 17:50:41 UTC
[jira] [Created] (TRAFODION-2573) Support Index hints in a DML
statement
Suresh Subbiah created TRAFODION-2573:
-----------------------------------------
Summary: Support Index hints in a DML statement
Key: TRAFODION-2573
URL: https://issues.apache.org/jira/browse/TRAFODION-2573
Project: Apache Trafodion
Issue Type: Improvement
Components: sql-cmp
Affects Versions: any
Reporter: Suresh Subbiah
Assignee: Hans Zeller
Fix For: 2.2-incubating
Add support for index hints to be embedded in an SQL DML statement.
Examples are
set schema sch;
create table t1 (a int not null primary key, b int, c int) salt using 2 partitions ;
create index ix1 on t1(b) ;
create index ix2 on t1(c) ;
create index ix3 on t1(b) salt like table;
create index ix4 on t1(c) salt like table;
select * from t1 <<+ index TRAFODION.SCH.IX1>> where b > 10 ;
select * from t1 <<+ index TRAFODION.SCH.IX3>> where b > 10 ;
select a,b from t1 <<+ index TRAFODION.SCH.IX1>> where b > 10 ;
select a,b from t1 <<+ index TRAFODION.SCH.IX3>> where b > 10 ;
update t1 <<+ index TRAFODION.SCH.IX1>> set c = 5 where b > 10;
update t1 <<+ index TRAFODION.SCH.IX1>> set c = 5 where b = 10;
update t1 <<+ index TRAFODION.SCH.IX3>> set c = 5 where b > 10;
update t1 <<+ index TRAFODION.SCH.IX3>> set c = 5 where b = 10;
delete from t1 <<+ index TRAFODION.SCH.IX2>> where c > 10;
delete from t1 <<+ index TRAFODION.SCH.IX2>> where c = 10;
delete from t1 <<+ index TRAFODION.SCH.IX4>> where c > 10;
delete from t1 <<+ index TRAFODION.SCH.IX4>> where c = 10;
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)