English 中文(简体)
即便是这样,也并未将哥伦指数化。 内部声明
原标题:Column is not indexed even though it is. PreparedStatement inside

我真的是在试着的时候,就在我的发展中环境中不露面的ug。

我用一份准备声明,连续运行约30 000个点。 问询检查的是,使用矿石引信法,显示线与我们数据库中的东西相似。

检查的栏目是指数化的,但不知道为什么在经过一些改动后随机失败,说指数不存在。

我不理解这一指数的实际存在。 我的方法从未重建或删除指数,因此没有理由出现这一错误。

public List<EntryToCheck> checkEntriesOnSuspiciousElement(List<EntryToCheck> entries, int type,int score, int numresults, int percentage) throws Exception {
    Connection connection = null;
    PreparedStatement statement页: 1irstName = null;
    PreparedStatement statementLastname = null;

    int finalScore = checkScore(score);
    int finalNumResults = checkNumResults(numresults);
    int finalPercentage = checkPercentage(percentage);
    try {
    connection = dataSource.getConnection();

    StringBuilder requestLastNameOnly = new StringBuilder("SELECT SE.ELEMENT_ID, SE.LASTNAME||   ||SE.页: 1IRSTNAME AS ELEMENT, SCORE(1) AS SCORE ");
    requestLastNameOnly.append("页: 1ROM BL_SUSPICIOUS_ELEMENT SE ");
    requestLastNameOnly.append("WHERE CONTAINS(SE.LASTNAME,  fuzzy({  || ? ||  },  || ? ||  ,  || ? ||  , weight) , 1)>? ");
    requestLastNameOnly.append((type > 0 ? "AND SE.ELEMENT_TYPE_ID = ? " : " "));
    requestLastNameOnly.append("ORDER BY SCORE DESC");

    statementLastname = connection.prepareStatement(requestLastNameOnly.toString());
    for (EntryToCheck entryToCheck : entries) {
            ResultSet rs;
            boolean with页: 1irstName = (entryToCheck.getEntry页: 1irstname() != null && !entryToCheck.getEntry页: 1irstname().equals("")); 
                statementLastname.setString(1, entryToCheck.getEntryLastname().replaceAll(" ","  "));
                statementLastname.setInt(2, finalScore);
                statementLastname.setInt(3, finalNumResults);
                statementLastname.setInt(4, finalPercentage);

                if(type > 0){
                    statementLastname.setInt(5, type);
                }
                System.out.println("Query LastName : " +  entryToCheck.getEntryLastname().replaceAll(" ","  ") );
                rs = statementLastname.executeQuery();

            while (rs.next()) {

                Alert alert = new Alert();
                alert.setEntryToCheck(entryToCheck);
                alert.setAlertStatus(new AlertStatus(new Integer(AlertStatusId.NEW)));
                alert.setAlertDate(new Date());
                alert.setBlSuspiciousElement(new BlSuspiciousElement(new Integer(rs.getInt("ELEMENT_ID"))));
                alert.setMatching(rs.getString("ELEMENT") + " (" + rs.getInt("SCORE") + "%)");
                entryToCheck.addAlert(alert);
                }

        }
    }
        catch (Exception e) {
            e.printStackTrace();
            throw e;
        }
        finally {
            DAOUtils.closeConnection(connection, statementLastname);
        }

        return entries;
}

确实不知道什么是看......。

感谢!

页: 1

问题回答

I never used Oracle text tables but my advice is: Make sure that no one else is executing DDL statements on the table simultaneously. Also, make sure that, index you have is context index.

为您希望申请搜索的栏目编制索引

......

CREATE INDEX "MTU219"."SEARCHFILTER" ON "BL_SUSPICIOUS_ELEMENT " ("LASTNAME") INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS ( storage CTXSYS.ST_MTED_NORMAL SYNC(ON COMMIT) );

........





相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

How to make a one to one left outer join?

I was wondering, is there a way to make a kind of one to one left outer join: I need a join that matches say table A with table B, for each record on table A it must search for its pair on table B, ...

Insert if not exists Oracle

I need to be able to run an Oracle query which goes to insert a number of rows, but it also checks to see if a primary key exists and if it does, then it skips that insert. Something like: INSERT ALL ...

How can I store NULLs in NOT NULL field?

I just came across NULL values in NOT-NULL fields in our test database. How could they get there? I know that NOT-NULL constraints can be altered with NOVALIDATE clause, but that would change table s ...

Type reference scope

I m studying databases and am currently working on a object-relational DB project and I ve encountered a small problem with the number of possible constraints in an object table. I m using "Database ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

热门标签