ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolai Tikhonov <ntikho...@apache.org>
Subject Re: Performance comparison of Primary Vs Secondary Indexes
Date Thu, 07 Dec 2017 15:01:33 GMT
Hello!

It looks as expected behaviour. In the first request you use IgniteCache
API. In this case Apache Ignite knows which node in a cluster have a data
and fetch a entry from it. Only one request and one responce.

But in the second request Ignite does more action. In the first, Apache
Ignite parses your SQL queries, then send requests on all node which own
this cache. It happens because it's  unknown exactly nodes that have the
entries that matched by the conditions. The difference in performance looks
as reasonable.

Thanks,
Nikolay

On Thu, Dec 7, 2017 at 11:17 AM, Naveen <naveen.bandaru@gmail.com> wrote:

> Hi
>
> Am using 2.3
>
> Doing a POC with 2 caches each having 10M records.
> My cluster configuration is, 3 server nodes and one client node.
>
> When I do the PT on primary key thru Rest API like this, I could TPS of
> around 30K and above.
>
> http://10.144.114.115:8080/ignite?cmd=get&key=P100000007&
> cacheName=Customer
>
> I have created an index on Customer table on column ACCOUNT_ID_LIST and ran
> the below command to verify the query, its querying in 0.025 secs,
> hopefully
> it is using the index.
>
> 0: jdbc:ignite:thin://127.0.0.1> select * from "Customer".CUSTOMER where
> ACCOUNT_ID_LIST ='A100000001';
> +--------------------------------+--------------------------
> ------+--------------------------------+--------------------
> ------------+-------------------------------+
> |        ACCOUNT_ID_LIST         |      CUST_ADDRESS_ID_LIST      |
> PARTYROLE            |       PARTY_STATUS_CODE        |           REFREE_ID
> |
> +--------------------------------+--------------------------
> ------+--------------------------------+--------------------
> ------------+-------------------------------+
> | A100000001                     | custAddressIdList1             |
> partyrole1                     | partyStatusCode1               | refreeId1
> |
> +--------------------------------+--------------------------
> ------+--------------------------------+--------------------
> ------------+-------------------------------+
> 1 row selected (0.025 seconds)
>
> And when I do the PT for the the below SQL Query thru REST API, TPS has
> come
> down to 4.5K
>
> http://10.144.114.115:8080/ignite?cmd=qryexe&type=Customer&pageSize=10&
> cacheName=Customer&arg1=A100000001&qry=ACCOUNT_ID_LIST+%3D+%3F
>
> Will it be so drastic drop in TPS querying on a secondary index?
>
> My question is, hows the performance of secondary indexes in Ignite, how
> does it work internally.
> Basically when it comes to Primary indexes, based on the key value, Ignite
> cluster get to know which node is storing this record and directly request
> goes to that node and gets the data, how does it work for secondary index.
> I
> doubt, it will not work the same way it does for primary index.
>
> Can someone make me understand how it works.
>
> Thanks
> Naveen
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Mime
View raw message