create unique index
In DB2 UDB I can create an index using the following syntax
create unique index I_0004 on TABLENAME (a) INCLUDE (b, c, d);
where a, b, c and d are field of the table TABLENAME
.
In DB2 for os390 this syntax (the INCLUDE
keyword) is not allowed, so I am creating the indexes as follows
create unique index I_0004 on TABLENAME (a);
create index I_0005 on TABLENAME (a, b, c, d);
Are the two statements above equivalent to the solution with the INCLUDE
keyword?
index columns order
And, if I slightly modify the first statement
create index I_0005 on TABLENAME (a, b, c, d) ALLOW REVERSE SCANS;
is this ALLOW REVERSE SCANS
equivalent to creating indexes
create index I_0005 on TABLENAME (a, b, c, d);
create index I_0005 on TABLENAME (d, c, b, a);
or does it consider also any combination of the given columns (I mean, a,b,c,d; b,c,d,a; c,d,a,b; and so on...)?