You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2017/04/03 17:54:41 UTC
[jira] [Updated] (TRAFODION-2573) Support Index hints in a DML
statement
[ https://issues.apache.org/jira/browse/TRAFODION-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hans Zeller updated TRAFODION-2573:
-----------------------------------
Issue Type: Sub-task (was: Improvement)
Parent: TRAFODION-2569
> Support Index hints in a DML statement
> --------------------------------------
>
> Key: TRAFODION-2573
> URL: https://issues.apache.org/jira/browse/TRAFODION-2573
> Project: Apache Trafodion
> Issue Type: Sub-task
> 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)