openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalina Wei (JIRA)" <>
Subject [jira] Created: (OPENJPA-1585) Additional trace to relate SQL pushdowns with entity action or JPQL query
Date Fri, 19 Mar 2010 02:51:27 GMT
Additional trace to relate SQL pushdowns with entity action or JPQL query

                 Key: OPENJPA-1585
             Project: OpenJPA
          Issue Type: Improvement
    Affects Versions: 2.0.0
            Reporter: Catalina Wei
            Assignee: Catalina Wei
            Priority: Trivial

Additional trace can help users understand and relate query or entity actions with SQL pushdowns:
1.  why SQL pushdown has JOINs that are generated, a trace dumping out eager relations for
the generated SQL is very helpful.
2. a JPQL or a simple em.find() generated caused more than one SQL requests.
3. entity instance actions (INSERT, UPDATE, DELETE) generated SQL

1. JOIN is generated because of the eager relation 'entitya':
4891  p1  TRACE  [main] openjpa.Query - Executing query: select s from CascadeB s
4906  p1  TRACE  [main] openjpa.jdbc.Extra - Eager relations: [test.entities.CascadeB.entitya]
5141  p1  TRACE  [main] openjpa.jdbc.SQL - <t 26882784, conn 9493> executing prepstmnt
25862088 SELECT,,, FROM CascadeB t0 LEFT OUTER JOIN CascadeA t1

2. flush for new instance of entity action:
7250  p1  TRACE  [main] openjpa.jdbc.Extra - flush: org.apache.openjpa.kernel.PNewState for
7250  p1  TRACE  [main] openjpa.jdbc.SQL -: INSERT INTO BasicA (age,id,name) VALUES (?,?,?)

2: loading relation 'entitya':
7734  p1  TRACE  [main] openjpa.jdbc.Extra - load field: 'entitya' for oid=1 class test.entities.BasicB
7734  p1  TRACE  [main] openjpa.jdbc.Extra - find: oid=1 class test.entities.BasicA
7734  p1  TRACE  [main] openjpa.jdbc.Extra - getInitializeStateResult: oid=1 class test.entities.BasicA
7969  pdq1  TRACE  [main] openjpa.jdbc.SQL - <t 26882784, conn 3125250> executing prepstmnt
28008463 SELECT FROM BasicA t0 WHERE = ?  optimize for 1 row [params=(int) 1]

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message