sqysl 发表于 2014-10-9 12:27
1、分区是什么分区?月分区?周分区?天分区?
2、现在的情况是,可能走索引也可能不走(因为没看到执行计 ...
谢谢您的回复!
1、按jgsj分区按月,一月3000w(有的地方9000w)
2、执行计划是走的组合索引,
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter(ROWNUM=HEXTORAW('878DF6F0E7C3C3FF')AND
SYS_OP_DESCEND("JGSJ")=TO_DATE
(' 2014-01-15 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
SYS_OP_UNDESCEND(SYS_OP_DESCEND("JGSJ")) 我建了全文索引。但是像“皖DSYQOW”这样的车牌号怎么分词?
Somebody with text indexes on the Chinese language can help. Sorry. My experience has always been with English, or any language with clear word boundaries, e.g. in "Hello world", a text index is built with two tokens "hello" and "world". With Chinese such as “皖DSYQOW”, I'm not sure how it's broken down. Maybe each character is one token? I'd love to be educated.
In the meantime, make sure your query is changed to using the appropriate syntax. For example, if you created a context index, the syntax to use it is
where contains(col,'keyword') > 0
If you created a ctxcat index (which I believe is better and does not need periodic manual synchronization after DML), the syntax is
where catsearch(col,'keyword',null) > 0
The difference between these two types is described at
http://docs.oracle.com/cd/E11882 ... /csql.htm#CCREF0105
> like%..%是必须的因为要模糊查询的时候可能是车牌号中间部分
The data that is inputted must be structured. Allowing users to enter free text causes a relational database to suffer in performance. There's no better solution than stopping the free text input and, if there's already some in the database, cleaning up. Once you do that, follow sqysl's suggestion to drop the leading % in the where-clause.
You can allow users to enter free text in a column such as COMMENT or ADDITIONAL_INFO. But the values in those columns are usually not searched, but simply displayed when *other* columns are searched. |