You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2014/04/17 18:33:14 UTC
[jira] [Commented] (OAK-1746) find portable variant of SQL "limit"
clause
[ https://issues.apache.org/jira/browse/OAK-1746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973127#comment-13973127 ]
Jukka Zitting commented on OAK-1746:
------------------------------------
Would the {{setFetchSize()}} method coupled with an explicit read counter have a similar effect in practice?
> find portable variant of SQL "limit" clause
> -------------------------------------------
>
> Key: OAK-1746
> URL: https://issues.apache.org/jira/browse/OAK-1746
> Project: Jackrabbit Oak
> Issue Type: Sub-task
> Components: mongomk
> Reporter: Julian Reschke
> Assignee: Julian Reschke
> Fix For: 1.1
>
>
> We currently use in RDBDocumentStore's query implementation:
> {code}
> String t = "select DATA, BDATA from " + tableName + " where ID > ? and ID < ?";
> if (indexedProperty != null) {
> t += " and MODIFIED >= ?";
> }
> t += " order by ID";
> if (limit != Integer.MAX_VALUE) {
> t += " limit ?";
> }
> {code}
> but this doesn't work for all DB2 installations (it works on mine, but not on Manfred's).
> Apparent "fetch first ... rows only" is supposed to work (*), but I didn't have success yet with it.
> (*) In H2 with 1.4.*, or in 1.3 with "mode=DB2"
--
This message was sent by Atlassian JIRA
(v6.2#6252)