Hi Bob,

If you put annotation on fields then need to use
"CacheConfiguration.setIndexedTypes". But for Query Entity, you must
discribe entiti in configuration (QueryEntity.setIndexes) without
annotation.

Please, look  at [1]

If it doesn't help, provide your query configuration.

[1]: https://apacheignite.readme.io/docs/sql-queries

On Mon, Oct 24, 2016 at 10:47 AM, 胡永亮/Bob <[email protected]> wrote:

> Hi everyone,
>
>     I have a model Kc21, akc273 is its one String column .
>
>     I create the index in this column, as the following:
>     @QuerySqlField(index = true)
>     private String akc273;
>
>     Then I load data into cache from oracle, total 47535542 rows.
>
>     I execute the sql query to get the execute plan:
>
>
>
> *SqlFieldsQuery sql = new SqlFieldsQuery(
>   "explain select BKC231 from Kc21 where akc273 = '王妍'"); logger.info
> <http://logger.info>("execute plan:"+cache.query(sql).getAll());*
>
>     The result is:
>     *execute plan:[[SELECT*
>
>
>
>
>
>
>
> *    BKC231 AS __C0FROM "Kc21Cache".KC21    /* "Kc21Cache".KC21.__SCAN_ 
> */WHERE AKC273 = STRINGDECODE('\u738b\u598d')], [SELECT    __C0 AS BKC231FROM 
> PUBLIC.__T0    /* "Kc21Cache"."merge_scan" */]]
> *
>
>     I think this tell me that the index is not used in this sql. Why?
>     And the query time also very long as the time before creating this
> index.
>
>     Thank your reply. ^V^
>
>     Bob
>
> ------------------------------------------------------------
> ---------------------------------------
> Confidentiality Notice: The information contained in this e-mail and any
> accompanying attachment(s)
> is intended only for the use of the intended recipient and may be
> confidential and/or privileged of
> Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader
> of this communication is
> not the intended recipient, unauthorized use, forwarding, printing,
> storing, disclosure or copying
> is strictly prohibited, and may be unlawful.If you have received this
> communication in error,please
> immediately notify the sender by return e-mail, and delete the original
> message and all copies from
> your system. Thank you.
> ------------------------------------------------------------
> ---------------------------------------
>



-- 
Vladislav Pyatkov

Reply via email to