ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Pyatkov <vldpyat...@gmail.com>
Subject Re: ignite in-memory sql query performance issue
Date Mon, 06 Jun 2016 06:54:02 GMT
Hello,

Do you use indexes in a SQL query?
If it does not, that try to create a group index over field1 and fild2.
You can find a description here
https://apacheignite.readme.io/docs/sql-queries

On Mon, Jun 6, 2016 at 5:56 AM, Zhengqingzheng <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
>
>
>
>
>
>
>



-- 
Vladislav Pyatkov

Mime
View raw message