Query with CAST and IN operator
Query with CAST operator taking more time where as IN is taking lesstime.
Database : 11.2 OS:Sun Solaris 10
We are asked to use CAST in the query, can you please share details which operator is good in this case.
Query with CAST -
SELECT DISTINCT A.ID ID, a.id_object_to id_object_to, 
  DECODE( ATO.id_association,NULL,a.id_object_what,ATO.id_object_what) id_object_what_override, 
  a.id_object_what id_object_what, 
  ATO.id_association id_association 
FROM ASSOCIATION A, 
  ASSOCIATION_TYPE AT, 
  OBJECT_TYPE OT, 
  (SELECT id_object_what,id_association 
  FROM ASSOCIATION_TEMP_OVERRIDE