Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting Index at the time of selecting records
Message
De
23/05/2001 06:49:44
 
 
À
23/05/2001 05:50:18
Information générale
Forum:
Oracle
Catégorie:
Autre
Divers
Thread ID:
00510232
Message ID:
00510246
Vues:
15
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform