156 words

IMK Stall with certain query

#1
2015-09-01 15:04

Hello,

I am experiencing constant IMK Stall notifications from Java when using certain query:

2015-09-01 16:53:15.785 java[3678:5217999] IMK Stall detected, *please Report* your user scenario in <rdar://problem/16792073> - (imkxpc_deadKeyStateWithReply:) block performed very slowly (4.63 secs)

i am sure it is linked with objectdb as these are thrown each time one particular query is used:

String param = "%"+begining+"%";
CriteriaBuilder cb = DATABASE.em.getCriteriaBuilder();
CriteriaQuery<OrderData> query = cb.createQuery(OrderData.class);       
Root<OrderData> ORDER = query.FROM(OrderData.class);
Predicate p1 = cb.LIKE(cb.lower(ORDER.get("buyerId")), param);
Predicate p2 = cb.LIKE(cb.lower(ORDER.get("buyerName")), param);
query.SELECT(ORDER);
query.WHERE(cb.OR(p1, p2));
List<OrderData> orders = DATABASE.em.createQuery(query).getResultList();

Is it a known issue? Is there anything i can do?

Thanks.

lo
lo's picture
Joined on 2015-07-12
User Post #5
#2
2015-09-01 15:22

No such known issue. The query looks fine. It could be slow if you have many orders.

Indexes on buyerId (if not the PK) and buyerName may improve performance.

 

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,302
#3
2015-09-01 15:29

OK, yes quantity is very large, these entities have too many fields and yet worst contains many strings. Primary Key is separate so i can use indexes, thank you for the documentation on this topic, concise and clear as usual.

Thank you support

lo
lo's picture
Joined on 2015-07-12
User Post #6

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel