Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Index at the time of selecting records
Message
From
23/05/2001 06:49:44
 
 
To
23/05/2001 05:50:18
General information
Forum:
Oracle
Category:
Other
Miscellaneous
Thread ID:
00510232
Message ID:
00510246
Views:
14
As far as I know you don't ...

You instead select the data that would use this index by specifying the correct where clause...

i.e.
oCommand=CREATEOBJECT("ADODB.COMMAND")
oCommand.addparameter('emp_id',adchar,emp_id_size,emp_id_Val)
.
.
oCommand.commandtext='select * from Employee_Mst where emp_id=? and emp_join_date=?'

oRecordSet=oCommand.execute()

You're index might not even be used depending on the optimizer.
It is more likely to use it if you create three seperate indexes non-composite:

index on Emp_Id
index on Emp_Join_Date
index on Emp_Name

Otherwise you would have to write the query as:
'select * from Employee_Mst where emp_id||emp_join_date=?'

Which is not that good for index size and usablity..

HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform