ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhengqingzheng <zhengqingzh...@huawei.com>
Subject re: ignite in-memory sql query performance issue
Date Mon, 06 Jun 2016 09:19:17 GMT
Hi Vladimir,
I have tried to reset the group index definition.
Using gId and oId as the group index, the time used to retrieve the query reduced to 16ms.

In order to speed up the sql queries, do I need to set all the possible group indexes ?

Best regards,
Kevin

发件人: Vladimir Ozerov [mailto:vozerov@gridgain.com]
发送时间: 2016年6月6日 16:10
收件人: user@ignite.apache.org
主题: Re: ignite in-memory sql query performance issue

Hi Kevin,

Could you please provide the source code of SelectedClass and estimate number of entries in
the cache? As Vladislav mentioned, most probably this is a matter of setting indexes on relevant
fields. If you provide the source code, we will be able to give you exact example on how to
do that.

Vladimir.

On Mon, Jun 6, 2016 at 5:56 AM, Zhengqingzheng <zhengqingzheng@huawei.com<mailto:zhengqingzheng@huawei.com>>
wrote:
Hi there,
When using sql query to get a list of objects, I find that the performance is really slow.
I am wondering, is this normal?
I tried to call a sql query as follows:
String qryStr = "select * from SelectedClass where  field1= ? and field2=?";
SqlQuery<BinaryObject, BinaryObject> qry = new SqlQuery(SelectedCalss.class, qryStr);
qry.setArgs( "97901336", "a88");

If I call getAll() method like this:
List<Entry<BinaryObject, BinaryObject>> result = cache.withKeepBinary().query(qry).getAll();
It took 160ms to get all the objects (only two objects inside the list)

it takes 1ms to get a querycursor object, like this:
         QueryCursor qc = cache.withKeepBinary().query(qry);
But still need 160ms to put the objects into a list and return;

Best regards,
Kevin




Mime
View raw message