openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENJPA-2356) Use new Offset/Limit/ROWNUM features in DB2 family of databases for range queries
Date Mon, 06 May 2013 15:50:16 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pinaki Poddar updated OPENJPA-2356:
-----------------------------------

    Attachment: graycol.gif


Albert,
  The test (TestRangeQuery) runs OK in my environment against MySQL. Bu
these features vary across database versions.
Is it possible for you to observe the following
   a) the database and driver version being used?
   b) the SQL it spits out (lok for the last two especially)

In my environment it looks as follows

openjpa.jdbc.JDBC - Connected to MySQL version 5.5 using JDBC driver
MySQL-AB JDBC Driver version mysql-connector-java-5.1.12 ( Revision: $
{bzr.revision-id} ).

prepstmnt 535240679 SELECT t0.id, t0.name FROM EagerOuterJoinPC t0 ORDER BY
t0.name ASC LIMIT ?, ? [params=(long) 5, (long) 15]
prepstmnt 1628659987 SELECT COUNT(*) FROM (SELECT t0.id FROM
EagerOuterJoinPC t0 LIMIT ?, ?) s [params=(long) 5, (long) 15]




Regards --

Pinaki Poddar
Chair, Apache OpenJPA Project           http://openjpa.apache.org/
JPA Expert Group Member
Application & Integration Middleware








From:	"Albert Lee (JIRA)" <jira@apache.org>
To:	Pinaki Poddar/Dallas/IBM@IBMUS
Date:	05/05/2013 06:30 PM
Subject:	[jira] [Commented] (OPENJPA-2356) Use new Offset/Limit/ROWNUM
            features in DB2 family of databases for range queries




    [
https://issues.apache.org/jira/browse/OPENJPA-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13649476#comment-13649476
 ]

Albert Lee commented on OPENJPA-2356:
-------------------------------------

MySQL also failed the same way.

queries
---------------------------------------------------------------------------------

some form of Offset and Limit syntax in database SQL query. Recently DB2
and Derby has added ROWNUM and FETCH offset respectively.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA
administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


                
> Use new Offset/Limit/ROWNUM features in DB2 family of databases for range queries
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2356
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2356
>             Project: OpenJPA
>          Issue Type: Improvement
>            Reporter: Pinaki Poddar
>            Assignee: Pinaki Poddar
>             Fix For: 2.3.0
>
>         Attachments: graycol.gif
>
>
> JPA queries that use setFirstResult() and/or setMaxResult() translate to some form of
Offset and Limit syntax in database SQL query. Recently DB2 and Derby has added ROWNUM and
FETCH offset respectively.
> OpenJPA should use these facilities when appropriate.   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message