-----原始邮件-----
发件人:"马武" <[email protected]>
发送时间:2018-09-29 12:36:33 (星期六)
收件人: [email protected]
抄送:
主题: fieldsQueryCursor.getAll() performance is really bad
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<?>> fieldsQueryCursor =
igniteRetrieve.getIgnite().cache("dpshopmaterial").query(new
SqlFieldsQuery(queryStr));
List<List<?>> 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