2007 Mar 13 5:03 PM
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
2007 Mar 13 5:08 PM
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.
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
2007 Mar 13 5:08 PM
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.
2007 Mar 13 5:10 PM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |