Note that there are some explanatory texts on larger screens.

plurals
  1. POappengine jpa cache level 2 performance is bad
    primarykey
    data
    text
    <p>appengine java sdk 1.6.4.1 datanucleus jpa2.0.0 datanucleus cache 3.0.1</p> <p>hi all</p> <p>i am using the DN cache level 2 plugin.</p> <pre><code>&lt;property name="datanucleus.cache.level2.type" value="javax.cache"/&gt; &lt;property name="datanucleus.cache.level2.cacheName" value="xxxxx"/&gt; </code></pre> <p>i noticed a performance issue with a straight forward query.</p> <pre><code>Query query = em.createQuery("Select m.key from MessageUser m " + "where " + " m.userKeyList = :userKey " + "AND m.date &gt; :date ORDER BY m.date DESC"); </code></pre> <p>with the cache ON it execute in 1159 ms, cache OFF 86 ms.</p> <p>something is clearly wrong. from the appstats trace the cache version is retrieving each entity in a serial manner from memcache.</p> <p>any explanation on whether this is expected or have i stuffed up?</p> <p>cache OFF</p> <pre><code>(1) 2012-04-12 06:19:38.737 "GET /timeline/status?id=49001&amp;sincedate=1333485300" 200 real=86ms api=0ms overhead=0ms (6 RPCs) @11ms datastore_v3.RunQuery real=10ms api=241ms @31ms datastore_v3.Get real=7ms api=208ms @4ms datastore_v3.BeginTransaction real=4ms api=0ms @52ms datastore_v3.Get real=7ms api=8ms @65ms datastore_v3.Get real=4ms api=0ms @78ms datastore_v3.Commit real=4ms api=0ms </code></pre> <p>cache ON</p> <pre><code>9) 2012-04-12 05:54:24.385 "GET /timeline/status?id=49001&amp;sincedate=1333485300" 200 real=1159ms api=0ms overhead=0ms (109 RPCs) @13ms datastore_v3.RunQuery real=12ms api=241ms @28ms memcache.Get real=2ms api=0ms @33ms memcache.Get real=2ms api=0ms @37ms memcache.Get real=3ms api=0ms @42ms memcache.Get real=2ms api=0ms @47ms memcache.Get real=2ms api=0ms @50ms memcache.Get real=2ms api=0ms @54ms memcache.Get real=2ms api=0ms @57ms memcache.Get real=2ms api=0ms &lt;repeat this for another 50 or60 times @3ms datastore_v3.BeginTransaction real=4ms api=0ms @1126ms datastore_v3.Get real=5ms api=8ms @1134ms memcache.Get real=3ms api=0ms @1139ms memcache.Get real=2ms api=0ms @1143ms datastore_v3.Get real=4ms api=0ms @1153ms datastore_v3.Commit real=3ms api=0ms </code></pre> <p>the code that iterates the entity list</p> <pre><code>List&lt;Message&gt; list = messageDAO.findSinceDate(userKey, sinceDate); JSONArray jsonList = new JSONArray(); for (Message message : list) { item.put("id", message.getKey().getId()); item.put("name", message.getName()); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload