You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Carl Hall <ca...@hallwaytech.com> on 2010/09/01 15:45:15 UTC

Converting XPath to JCR-SQL2

Since XPath has been deprecated for searching, I'm working to change over
some XPath queries to JCR-SQL2.  I have this one that is killing
performance.    Translating the query below to JCR-SQL2 caused a performance
problem (0.072s -> 5s+).

Am I doing something wrong or is the JCR-SQL2 engine still coming along?

XPath::
//*[@sling:resourceType="sakai/group-profile" and
jcr:contains(.,'g-test-group')] order by @jcr:score descending

JCR-SQL2::
SELECT * FROM [nt:base] as n WHERE [sling:resourceType] =
"sakai/group-profile" and contains(n.*,'g-test-group') order by score() desc

Re: Converting XPath to JCR-SQL2

Posted by Carl Hall <ca...@hallwaytech.com>.
Hi Jukka,

Thanks for the response and your continued work on JR.  I look forward using
your improvements!

Carl


On Wed, Sep 1, 2010 at 9:54 AM, Jukka Zitting <ju...@gmail.com>wrote:

> Hi,
>
> On Wed, Sep 1, 2010 at 3:45 PM, Carl Hall <ca...@hallwaytech.com> wrote:
> > Since XPath has been deprecated for searching, I'm working to change over
> > some XPath queries to JCR-SQL2.  I have this one that is killing
> > performance.    Translating the query below to JCR-SQL2 caused a
> performance
> > problem (0.072s -> 5s+).
> >
> > Am I doing something wrong or is the JCR-SQL2 engine still coming along?
>
> The current JCR-SQL2 implementation is not yet optimized for performance.
>
> I'm currently working on improving the JCR-SQL2 implementation, see
> JCR-2715 [1]. I expect to make JCR-SQL2 query performance comparable
> to XPath and SQL1 performance in time for the 2.2 release.
>
> [1] https://issues.apache.org/jira/browse/JCR-2715
>
> BR,
>
> Jukka Zitting
>

Re: Converting XPath to JCR-SQL2

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Sep 1, 2010 at 3:45 PM, Carl Hall <ca...@hallwaytech.com> wrote:
> Since XPath has been deprecated for searching, I'm working to change over
> some XPath queries to JCR-SQL2.  I have this one that is killing
> performance.    Translating the query below to JCR-SQL2 caused a performance
> problem (0.072s -> 5s+).
>
> Am I doing something wrong or is the JCR-SQL2 engine still coming along?

The current JCR-SQL2 implementation is not yet optimized for performance.

I'm currently working on improving the JCR-SQL2 implementation, see
JCR-2715 [1]. I expect to make JCR-SQL2 query performance comparable
to XPath and SQL1 performance in time for the 2.2 release.

[1] https://issues.apache.org/jira/browse/JCR-2715

BR,

Jukka Zitting