Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Do we create an Index?

Former Member
0 Likes
570

Hi All,

Have a question about Indexes.

We have a ZTable and we would like to create secondary indexes on the table.

Lets say the table has 5 fields a,b,c,d,e with a and b being primary keys.

Now we have a Select query as

select b from ztable where c in p_c and d in p_d.

Right now we already have a secondary index on fileds in the order b,c,d

However in our case we are not specifying b in the where clause.

Does it help creating a new index on fileds c,d, or would it be a replica of the existing index.

Any inputs will be appreciated.

Regards

Brain

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
550

h Brain,

I would suggest to create a new secondary index with c and d.

Your query will not replicate the existing secondary index to match

the where clause.

hope this helps,

Sajan Joseph.

h Brain,

I would suggest to create a new secondary index with c and d.

Your query will not replicate the existing secondary index to match

the where clause.

hope this helps,

Sajan Joseph.

2 REPLIES 2
Read only

Former Member
0 Likes
551

h Brain,

I would suggest to create a new secondary index with c and d.

Your query will not replicate the existing secondary index to match

the where clause.

hope this helps,

Sajan Joseph.

Read only

Former Member
0 Likes
550

It depends upon the size of the data being stored in the table. If the size is reasonable you can you use the existing secondary index.

Thanks,

Santosh