Hi,

 You can try to
1. add more nodes to reduce data set on each node.
2. use query parallelizm [1].
3. add a indexed field to be used in WHERE clause instead of function.

[1]
https://apacheignite.readme.io/docs/sql-performance-and-debugging#query-parallelism

On Tue, Aug 29, 2017 at 12:09 PM, mhetea <mihaela.he...@gmail.com> wrote:

> We have a cache with ~3million entries
>
> We execute the following query:
> select count(_key) from IgniteProduct as product where POSITION
> ('Z',manufacturerCode)>0
>
> The query takes about 7s though the index is hit.
>
> Query execution is too long [time=7103 ms, sql='SELECT
> COUNT(PRODUCT__Z0._KEY) __C0_0
> FROM "productCache".IGNITEPRODUCT PRODUCT__Z0
> WHERE POSITION('Z', PRODUCT__Z0.MANUFACTURERCODE) > 0', plan=
> SELECT
>     COUNT(PRODUCT__Z0._KEY) AS __C0_0
> FROM "productCache".IGNITEPRODUCT PRODUCT__Z0
>     /* "productCache".IGNITEPRODUCT_MANUFACTURERCODE_IDX */
> WHERE POSITION('Z', PRODUCT__Z0.MANUFACTURERCODE) > 0
> , parameters=[]]
> , parameters=[]]
>
> Can somebody help/offer an alternative?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/SQL-query-is-slow-tp16475.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov

Reply via email to