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 <[email protected]> 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
