SELECT:
TypedQuery<Point> query = em.createQuery( "SELECT p FROM Point p WHERE p.id = " + element.getId(), Point.class); List<Point> points = query.getResultList();
WRITE:
em.persist(p);
** the Point class is of the tutorial.
I found the above select method is ten times slower than the write method, in my very simple benchmark.
I guess the reason there is no SQL in the write method.
Is there any faster method of select?
TIA