Hi, Currently, query with in clause doesn't support indexes. Here you can find information about how to rewrite it properly: https://apacheignite-sql.readme.io/docs/performance-and-debugging#section-sql-performance-and-usability-considerations - paragraph 2
Evgenii сб, 29 сент. 2018 г. в 11:06, mawu <[email protected]>: > 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? my cache size is about > 750000; > > my code is like this : > queryStr = "select id shopid,publictransit,fulladdress,phoneno,votetotal, > dishtags, comment, adpic,preferpicurl, > dealgroupid,dealgrouptitle,dealgrouptype, newmembercardid, > newmembercardtitle, hasbooksetting, isqueueable,banquetinfo, > gifurl,recommendlang from dpshop where id in (112166223) AND id > 0 " > > FieldsQueryCursor<List&lt;?>> fieldsQueryCursor = > igniteRetrieve.getIgnite().cache("dpshopmaterial").query(new > SqlFieldsQuery(queryStr)); > List<List&lt;?>> rowData = fieldsQueryCursor.getAll(); // very slow > !!! > > > my record object as follows: > @SchemaDefinition(name = "dpshopmaterial") > public class DpShop { > @QuerySqlField(index = true) > @FieldMapping(name = "entityid") > private String id; > > @QuerySqlField > @FieldMapping > private Integer entitytype; > ................. > > it has the index field and sql is still very slow and > the fieldsQueryCursor.getAll() consuming 99% of the time . Is there any > way to tune > cursor.getAll() or any alternate way to get data from cursor. ] > > > best regrds > > mawu > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
