検索機能を改善するにはどうすればよいですか。何かを検索するためのコードをいくつか書きました。検索に時間がかかりすぎました。そして、ここのコードスニペットは、
この方法を使用してデータベースからデータをプルしています。、
   OracleConnection connection = null;
   OraclePreparedStatement ptmst = null;
   OracleResultSet rs = null;
   OracleCallableStatement cstmt = null;
   StringBuffer strBfr = new StringBuffer();
   ArrayList myList = new ArrayList();
    try
    {     
      connection = (OracleConnection) TransactionScope.getConnection();
      strBfr.append("select distinct .......... ");  
      ptmst = (OraclePreparedStatement)connection.prepareStatement(strBfr.toString());    
      rs = (OracleResultSet)ptmst.executeQuery();           
      while (rs.next()) 
                {               
                HashMap hashItems = new HashMap();
                hashItems.put("first",rs.getString(1));
                hashItems.put("second",rs.getString(2));    
                myList.add(hashItems);
                }       
    }
    catch (Exception e) {
        }
    finally {
            try {
                if (ptmst != null) {
                    ptmst.close();
                }
            } catch (Exception e) {
            }
            try {
                if (connection != null) {
                    TransactionScope.releaseConnection(connection);
                }
            } catch (Exception e) {
            }
        }
        return myList; 
私のjspで:
 ArrayList getValues = new ArrayList();     
    getValues = //calling Method here.
    for(int i=0; i < getValues.size();i++)  
    {
    HashMap quoteSrch=(HashMap)allPOV.get(i);                        
    first = (String)quoteSrch.get("first");
    second = (String)quoteSrch.get("second");
    }
クエリ:
SELECT DISTINCT(mtl.segment1),
  mtl.description ,
  mtl.inventory_item_id ,
  mtl.attribute16
FROM mtl_system_items_b mtl,
  mtl_system_items_tl k
WHERE 1                           =1
AND mtl.organization_id           = ?
AND k.inventory_item_id           = mtl.inventory_item_id
AND NVL(orderable_on_web_flag,'N')= 'Y'
AND NVL(web_status,'UNPUBLISHED') = 'PUBLISHED'
AND mtl.SEGMENT1 LIKE ?  --Here is the search term