posted 19 years ago
few point must be noted while creating index.
If your where clause uses more than one condition then create composite index instead of index for individual columns.
An example is you have a table tab1 and it has column A,B,C,D,E,F
and you use everytime A,B and C in your where clause so create composite index on columns A,B,C
Not only this it also depends how you are forming your query
If you have query
Select * from tab1 where A= ? and B=? and C=?
then it will work fine
but in
Select * from tab1 where C= ? and A=? and B=? Use of index is not guaranteed.
however index will be used for
Select * from tab1 where A= ? and B=?
but for
select * from tab1 where B=? and C=? use of index is not guranteed.
Anyone Please Correct me if I am wrong for above statements.
An advice to create index tablespace other then tablespace where data of table is lying.
[ November 04, 2004: Message edited by: Shailesh Chandra ]
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein