ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgenii Zhuravlev <e.zhuravlev...@gmail.com>
Subject Re: Ignite does not perform as expected
Date Tue, 08 Jan 2019 00:18:12 GMT
Ignite can use only one index per table, so, you probably need to create a
group index:
https://apacheignite-sql.readme.io/docs/schema-and-indexes#section-group-indexes

Evgenii

пн, 7 янв. 2019 г. в 06:47, Justin Ji <binarytree.j@foxmail.com>:

> when I run a SQL query with the two indexes, but ignite does not perform as
> expected, it only uses dpId does not use devId, I explain the SQL:
>
> SELECT
>     __Z0.ID AS __C0_0,
>     __Z0.GMTCREATE AS __C0_1,
>     __Z0.GMTMODIFIED AS __C0_2,
>     __Z0.DEVID AS __C0_3,
>     __Z0.DPID AS __C0_4,
>     __Z0.CODE AS __C0_5,
>     __Z0.NAME AS __C0_6,
>     __Z0.CUSTOMNAME AS __C0_7,
>     __Z0.MODE AS __C0_8,
>     __Z0.TYPE AS __C0_9,
>     __Z0.VALUE AS __C0_10,
>     __Z0.RAWVALUE AS __C0_11,
>     __Z0.TIME AS __C0_12,
>     __Z0.STATUS AS __C0_13,
>     __Z0.UUID AS __C0_14
> FROM "data_point".T_DATA_POINT __Z0
>     /* "data_point".IDX_DPID: DPID = 1 */
> WHERE (__Z0.DEVID = '00200008005459000a70')
>     AND (__Z0.DPID = 1)
>
> When I only use devId as query condition:
> SELECT
>     __Z0.ID AS __C0_0,
>     __Z0.GMTCREATE AS __C0_1,
>     __Z0.GMTMODIFIED AS __C0_2,
>     __Z0.DEVID AS __C0_3,
>     __Z0.DPID AS __C0_4,
>     __Z0.CODE AS __C0_5,
>     __Z0.NAME AS __C0_6,
>     __Z0.CUSTOMNAME AS __C0_7,
>     __Z0.MODE AS __C0_8,
>     __Z0.TYPE AS __C0_9,
>     __Z0.VALUE AS __C0_10,
>     __Z0.RAWVALUE AS __C0_11,
>     __Z0.TIME AS __C0_12,
>     __Z0.STATUS AS __C0_13,
>     __Z0.UUID AS __C0_14
> FROM "data_point".T_DATA_POINT __Z0
>     /* "data_point".IDX_DEVID: DEVID = '00200008005459000a70' */
> WHERE __Z0.DEVID = '00200008005459000a70'
>
> It is very strange, so can anyone tell me how to use devId and dpId as
> query
> index?
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Mime
View raw message