You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by sidhama <si...@wipro.com> on 2009/10/12 17:44:01 UTC

Fine tunning jcr query

Sir/Mam, 
I am executing the following query for getting the counts of Servers.
-----------
/jcr:root/Catalogs/catalog_1/Servers//*[jcr:like(@serverID, '%')]
-----------

It has around 150,000 nodes and it takes closely 26 secs for retrieving the
results, 
I modified it to by removing <Servers> folder
-----------
/jcr:root/Catalogs/catalog_1//*[jcr:like(@serverID, '%')]
-----------

It is giving a response time of 19secs, can i reduce it further well below
6/7 secs?

Please suggest if i could fine tune the query, why any jcr query executed
first time takes a longer time, but subsquently takes less time?

Thanks
Sidharth

-- 
View this message in context: http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25858002.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fine tunning jcr query

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

clarification on the 'resultFetchSize' parameter. When the parameter
is missing from the configuration, then the default value is assumed.
To use another value than the default, simply add the parameter to the
configuration and set an appropriate value.

regards
 marcel

On Mon, Oct 26, 2009 at 09:19, Marcel Reutegger
<ma...@gmx.net> wrote:
> Hi,
>
> the parameters for the SearchIndex didn't make it through to the
> mailing list. can you please post them again.
>
> one important parameter is 'resultFetchSize', which controls how many
> results are fetched initially. The default value us 2147483647, which
> basically means all. try to set it to 100.
>
> regards
>  marcel
>
> 2009/10/20 sidhama <si...@wipro.com>:
>>
>> Marcel,
>> I am using jackrabbit 1.5.4 version and my dafault/workspace.xml config is
>> as follows
>> ------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Workspace name="default">
>>        <!--
>>            virtual file system of the workspace:
>>            class: FQN of class implementing the FileSystem interface
>>        -->
>>        <FileSystem
>> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>>
>>        </FileSystem>
>>        <!--
>>            persistence manager of the workspace:
>>            class: FQN of class implementing the PersistenceManager
>> interface
>>   -->
>>         <PersistenceManager
>> class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
>>          <!--<PersistenceManager
>> class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
>> -->
>>
>>
>>
>>
>>
>>
>>                <!-- -->
>>
>>        </PersistenceManager>
>>        <!--            Search index and the file system it uses.
>>            class: FQN of class implementing the QueryHandler interface
>> -->
>>        <SearchIndex
>> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>>
>>
>>
>>
>>        </SearchIndex>
>>    </Workspace>
>>
>> -------
>>
>> Please do let me know if i could modify something for improving performance.
>> Thanks for your reply.
>>
>> Sid
>>
>>
>>
>> Marcel Reutegger wrote:
>>>
>>> Hi,
>>>
>>> what version of jackrabbit are you using and what's your workspace.xml
>>> configuration?
>>>
>>> see also this post:
>>> http://www.nabble.com/Explanation-and-solutions-of-some-Jackrabbit-queries-regarding-performance-td15028655.html
>>>
>>> regards
>>>  marcel
>>>
>>> On Fri, Oct 16, 2009 at 13:52, sidhama <si...@wipro.com> wrote:
>>>>
>>>> Marcel,
>>>> Thanks for the response, i tried your suggestion, and it came down to 21
>>>> secs, but my requirement is something well below 10 secs.
>>>>
>>>> Is there any way i can utilize the lucene package provided with
>>>> jackrabbit
>>>> implementation with explicit programming.
>>>> If what are the config changes or overriding i need to do.
>>>> I searched through web but no pointer for creating customizing classes
>>>> from
>>>> lucene packages i.e. writing my own lucene query builder, queryImpl or
>>>> results etc.
>>>>
>>>> I need your suggestion.
>>>>
>>>> Thanks
>>>> Sidharth
>>>>
>>>>
>>>> Marcel Reutegger-5 wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> like queries with a prefix wildcard are usually expensive. for your
>>>>> case you rather want to test the existence of the property:
>>>>>
>>>>> /jcr:root/Catalogs/catalog_1/Servers//*[@serverID]
>>>>>
>>>>> that's probably a lot faster.
>>>>>
>>>>> regards
>>>>>  marcel
>>>>>
>>>>> On Mon, Oct 12, 2009 at 17:44, sidhama <si...@wipro.com>
>>>>> wrote:
>>>>>>
>>>>>> Sir/Mam,
>>>>>> I am executing the following query for getting the counts of Servers.
>>>>>> -----------
>>>>>> /jcr:root/Catalogs/catalog_1/Servers//*[jcr:like(@serverID, '%')]
>>>>>> -----------
>>>>>>
>>>>>> It has around 150,000 nodes and it takes closely 26 secs for retrieving
>>>>>> the
>>>>>> results,
>>>>>> I modified it to by removing <Servers> folder
>>>>>> -----------
>>>>>> /jcr:root/Catalogs/catalog_1//*[jcr:like(@serverID, '%')]
>>>>>> -----------
>>>>>>
>>>>>> It is giving a response time of 19secs, can i reduce it further well
>>>>>> below
>>>>>> 6/7 secs?
>>>>>>
>>>>>> Please suggest if i could fine tune the query, why any jcr query
>>>>>> executed
>>>>>> first time takes a longer time, but subsquently takes less time?
>>>>>>
>>>>>> Thanks
>>>>>> Sidharth
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25858002.html
>>>>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25924125.html
>>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25973091.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
>

Re: Fine tunning jcr query

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

the parameters for the SearchIndex didn't make it through to the
mailing list. can you please post them again.

one important parameter is 'resultFetchSize', which controls how many
results are fetched initially. The default value us 2147483647, which
basically means all. try to set it to 100.

regards
 marcel

2009/10/20 sidhama <si...@wipro.com>:
>
> Marcel,
> I am using jackrabbit 1.5.4 version and my dafault/workspace.xml config is
> as follows
> ------
> <?xml version="1.0" encoding="UTF-8"?>
> <Workspace name="default">
>        <!--
>            virtual file system of the workspace:
>            class: FQN of class implementing the FileSystem interface
>        -->
>        <FileSystem
> class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
>
>        </FileSystem>
>        <!--
>            persistence manager of the workspace:
>            class: FQN of class implementing the PersistenceManager
> interface
>   -->
>         <PersistenceManager
> class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
>          <!--<PersistenceManager
> class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
> -->
>
>
>
>
>
>
>                <!-- -->
>
>        </PersistenceManager>
>        <!--            Search index and the file system it uses.
>            class: FQN of class implementing the QueryHandler interface
> -->
>        <SearchIndex
> class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>
>
>
>
>        </SearchIndex>
>    </Workspace>
>
> -------
>
> Please do let me know if i could modify something for improving performance.
> Thanks for your reply.
>
> Sid
>
>
>
> Marcel Reutegger wrote:
>>
>> Hi,
>>
>> what version of jackrabbit are you using and what's your workspace.xml
>> configuration?
>>
>> see also this post:
>> http://www.nabble.com/Explanation-and-solutions-of-some-Jackrabbit-queries-regarding-performance-td15028655.html
>>
>> regards
>>  marcel
>>
>> On Fri, Oct 16, 2009 at 13:52, sidhama <si...@wipro.com> wrote:
>>>
>>> Marcel,
>>> Thanks for the response, i tried your suggestion, and it came down to 21
>>> secs, but my requirement is something well below 10 secs.
>>>
>>> Is there any way i can utilize the lucene package provided with
>>> jackrabbit
>>> implementation with explicit programming.
>>> If what are the config changes or overriding i need to do.
>>> I searched through web but no pointer for creating customizing classes
>>> from
>>> lucene packages i.e. writing my own lucene query builder, queryImpl or
>>> results etc.
>>>
>>> I need your suggestion.
>>>
>>> Thanks
>>> Sidharth
>>>
>>>
>>> Marcel Reutegger-5 wrote:
>>>>
>>>> Hi,
>>>>
>>>> like queries with a prefix wildcard are usually expensive. for your
>>>> case you rather want to test the existence of the property:
>>>>
>>>> /jcr:root/Catalogs/catalog_1/Servers//*[@serverID]
>>>>
>>>> that's probably a lot faster.
>>>>
>>>> regards
>>>>  marcel
>>>>
>>>> On Mon, Oct 12, 2009 at 17:44, sidhama <si...@wipro.com>
>>>> wrote:
>>>>>
>>>>> Sir/Mam,
>>>>> I am executing the following query for getting the counts of Servers.
>>>>> -----------
>>>>> /jcr:root/Catalogs/catalog_1/Servers//*[jcr:like(@serverID, '%')]
>>>>> -----------
>>>>>
>>>>> It has around 150,000 nodes and it takes closely 26 secs for retrieving
>>>>> the
>>>>> results,
>>>>> I modified it to by removing <Servers> folder
>>>>> -----------
>>>>> /jcr:root/Catalogs/catalog_1//*[jcr:like(@serverID, '%')]
>>>>> -----------
>>>>>
>>>>> It is giving a response time of 19secs, can i reduce it further well
>>>>> below
>>>>> 6/7 secs?
>>>>>
>>>>> Please suggest if i could fine tune the query, why any jcr query
>>>>> executed
>>>>> first time takes a longer time, but subsquently takes less time?
>>>>>
>>>>> Thanks
>>>>> Sidharth
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25858002.html
>>>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25924125.html
>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25973091.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: Fine tunning jcr query

Posted by sidhama <si...@wipro.com>.
Marcel, 
I am using jackrabbit 1.5.4 version and my dafault/workspace.xml config is
as follows
------
<?xml version="1.0" encoding="UTF-8"?>
<Workspace name="default">
        <!--
            virtual file system of the workspace:
            class: FQN of class implementing the FileSystem interface
        -->
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            
        </FileSystem>
        <!--
            persistence manager of the workspace:
            class: FQN of class implementing the PersistenceManager
interface
   -->     
	 <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager"> 
	  <!--<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager">
-->
	    
		
		
		
		
		
		<!-- -->
		
	</PersistenceManager>
        <!--            Search index and the file system it uses.
            class: FQN of class implementing the QueryHandler interface       
-->
        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            
	    
            
            
	</SearchIndex>
    </Workspace>

-------

Please do let me know if i could modify something for improving performance.
Thanks for your reply.

Sid



Marcel Reutegger wrote:
> 
> Hi,
> 
> what version of jackrabbit are you using and what's your workspace.xml
> configuration?
> 
> see also this post:
> http://www.nabble.com/Explanation-and-solutions-of-some-Jackrabbit-queries-regarding-performance-td15028655.html
> 
> regards
>  marcel
> 
> On Fri, Oct 16, 2009 at 13:52, sidhama <si...@wipro.com> wrote:
>>
>> Marcel,
>> Thanks for the response, i tried your suggestion, and it came down to 21
>> secs, but my requirement is something well below 10 secs.
>>
>> Is there any way i can utilize the lucene package provided with
>> jackrabbit
>> implementation with explicit programming.
>> If what are the config changes or overriding i need to do.
>> I searched through web but no pointer for creating customizing classes
>> from
>> lucene packages i.e. writing my own lucene query builder, queryImpl or
>> results etc.
>>
>> I need your suggestion.
>>
>> Thanks
>> Sidharth
>>
>>
>> Marcel Reutegger-5 wrote:
>>>
>>> Hi,
>>>
>>> like queries with a prefix wildcard are usually expensive. for your
>>> case you rather want to test the existence of the property:
>>>
>>> /jcr:root/Catalogs/catalog_1/Servers//*[@serverID]
>>>
>>> that's probably a lot faster.
>>>
>>> regards
>>>  marcel
>>>
>>> On Mon, Oct 12, 2009 at 17:44, sidhama <si...@wipro.com>
>>> wrote:
>>>>
>>>> Sir/Mam,
>>>> I am executing the following query for getting the counts of Servers.
>>>> -----------
>>>> /jcr:root/Catalogs/catalog_1/Servers//*[jcr:like(@serverID, '%')]
>>>> -----------
>>>>
>>>> It has around 150,000 nodes and it takes closely 26 secs for retrieving
>>>> the
>>>> results,
>>>> I modified it to by removing <Servers> folder
>>>> -----------
>>>> /jcr:root/Catalogs/catalog_1//*[jcr:like(@serverID, '%')]
>>>> -----------
>>>>
>>>> It is giving a response time of 19secs, can i reduce it further well
>>>> below
>>>> 6/7 secs?
>>>>
>>>> Please suggest if i could fine tune the query, why any jcr query
>>>> executed
>>>> first time takes a longer time, but subsquently takes less time?
>>>>
>>>> Thanks
>>>> Sidharth
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25858002.html
>>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25924125.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25973091.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: OverlappingFileLockException

Posted by Thomas Müller <th...@day.com>.
Hi,

Please always write what Jackrabbit version you are using.

See: http://wiki.apache.org/jackrabbit/RepositoryLock

In your case, the repository is most likely already open in the same
process but within another class loader (for example, in another web
application). In this case you need to ensure that the repository is
closed when the web-application is stopped.

Regards,
Thomas

On Fri, Oct 16, 2009 at 10:57 PM, Phukan, Anit <An...@intuit.com> wrote:
>
> Hi,
>
> Did anyone encounter the following exception while trying to work with
> Jackrabbit on JBoss app server? It basically fails the service call the
> second time I try to access the repository due to the presence of the
> .lock file in the JBOSS_HOME\repository folder.
>
> Please let me know if anyone knows a way to work around this.
>
>
> 11:46:32,746 WARN  [RepositoryImpl] Existing lock file at
> C:\jboss-5.1.0.GA\bin\
> repository\.lock detected. Repository was not shut down properly.
> 11:46:32,746 ERROR [STDERR]
> java.nio.channels.OverlappingFileLockException
> 11:46:32,746 ERROR [STDERR]     at
> sun.nio.ch.FileChannelImpl$SharedFileLockTabl
> e.checkList(FileChannelImpl.java:1170)
> 11:46:32,762 ERROR [STDERR]     at
> sun.nio.ch.FileChannelImpl$SharedFileLockTabl
> e.add(FileChannelImpl.java:1072)
> 11:46:32,762 ERROR [STDERR]     at
> sun.nio.ch.FileChannelImpl.tryLock(FileChanne
> lImpl.java:878)
> 11:46:32,762 ERROR [STDERR]     at
> java.nio.channels.FileChannel.tryLock(FileCha
> nnel.java:962)
> 11:46:32,762 ERROR [STDERR]     at
> org.apache.jackrabbit.core.RepositoryImpl.acq
> uireRepositoryLock(RepositoryImpl.java:330)
> 11:46:32,762 ERROR [STDERR]     at
> org.apache.jackrabbit.core.RepositoryImpl.<in
> it>(RepositoryImpl.java:207)
> 11:46:32,762 ERROR [STDERR]     at
> org.apache.jackrabbit.core.RepositoryImpl.cre
> ate(RepositoryImpl.java:497)
>
> Thanks
> Anit
>

OverlappingFileLockException

Posted by "Phukan, Anit" <An...@intuit.com>.
Hi,

Did anyone encounter the following exception while trying to work with
Jackrabbit on JBoss app server? It basically fails the service call the
second time I try to access the repository due to the presence of the
.lock file in the JBOSS_HOME\repository folder. 

Please let me know if anyone knows a way to work around this.


11:46:32,746 WARN  [RepositoryImpl] Existing lock file at
C:\jboss-5.1.0.GA\bin\
repository\.lock detected. Repository was not shut down properly.
11:46:32,746 ERROR [STDERR]
java.nio.channels.OverlappingFileLockException
11:46:32,746 ERROR [STDERR]     at
sun.nio.ch.FileChannelImpl$SharedFileLockTabl
e.checkList(FileChannelImpl.java:1170)
11:46:32,762 ERROR [STDERR]     at
sun.nio.ch.FileChannelImpl$SharedFileLockTabl
e.add(FileChannelImpl.java:1072)
11:46:32,762 ERROR [STDERR]     at
sun.nio.ch.FileChannelImpl.tryLock(FileChanne
lImpl.java:878)
11:46:32,762 ERROR [STDERR]     at
java.nio.channels.FileChannel.tryLock(FileCha
nnel.java:962)
11:46:32,762 ERROR [STDERR]     at
org.apache.jackrabbit.core.RepositoryImpl.acq
uireRepositoryLock(RepositoryImpl.java:330)
11:46:32,762 ERROR [STDERR]     at
org.apache.jackrabbit.core.RepositoryImpl.<in
it>(RepositoryImpl.java:207)
11:46:32,762 ERROR [STDERR]     at
org.apache.jackrabbit.core.RepositoryImpl.cre
ate(RepositoryImpl.java:497)

Thanks
Anit

Re: Fine tunning jcr query

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

what version of jackrabbit are you using and what's your workspace.xml
configuration?

see also this post:
http://www.nabble.com/Explanation-and-solutions-of-some-Jackrabbit-queries-regarding-performance-td15028655.html

regards
 marcel

On Fri, Oct 16, 2009 at 13:52, sidhama <si...@wipro.com> wrote:
>
> Marcel,
> Thanks for the response, i tried your suggestion, and it came down to 21
> secs, but my requirement is something well below 10 secs.
>
> Is there any way i can utilize the lucene package provided with jackrabbit
> implementation with explicit programming.
> If what are the config changes or overriding i need to do.
> I searched through web but no pointer for creating customizing classes from
> lucene packages i.e. writing my own lucene query builder, queryImpl or
> results etc.
>
> I need your suggestion.
>
> Thanks
> Sidharth
>
>
> Marcel Reutegger-5 wrote:
>>
>> Hi,
>>
>> like queries with a prefix wildcard are usually expensive. for your
>> case you rather want to test the existence of the property:
>>
>> /jcr:root/Catalogs/catalog_1/Servers//*[@serverID]
>>
>> that's probably a lot faster.
>>
>> regards
>>  marcel
>>
>> On Mon, Oct 12, 2009 at 17:44, sidhama <si...@wipro.com> wrote:
>>>
>>> Sir/Mam,
>>> I am executing the following query for getting the counts of Servers.
>>> -----------
>>> /jcr:root/Catalogs/catalog_1/Servers//*[jcr:like(@serverID, '%')]
>>> -----------
>>>
>>> It has around 150,000 nodes and it takes closely 26 secs for retrieving
>>> the
>>> results,
>>> I modified it to by removing <Servers> folder
>>> -----------
>>> /jcr:root/Catalogs/catalog_1//*[jcr:like(@serverID, '%')]
>>> -----------
>>>
>>> It is giving a response time of 19secs, can i reduce it further well
>>> below
>>> 6/7 secs?
>>>
>>> Please suggest if i could fine tune the query, why any jcr query executed
>>> first time takes a longer time, but subsquently takes less time?
>>>
>>> Thanks
>>> Sidharth
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25858002.html
>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25924125.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: Fine tunning jcr query

Posted by sidhama <si...@wipro.com>.
Marcel, 
Thanks for the response, i tried your suggestion, and it came down to 21
secs, but my requirement is something well below 10 secs.

Is there any way i can utilize the lucene package provided with jackrabbit
implementation with explicit programming.
If what are the config changes or overriding i need to do.
I searched through web but no pointer for creating customizing classes from
lucene packages i.e. writing my own lucene query builder, queryImpl or
results etc.

I need your suggestion.

Thanks
Sidharth


Marcel Reutegger-5 wrote:
> 
> Hi,
> 
> like queries with a prefix wildcard are usually expensive. for your
> case you rather want to test the existence of the property:
> 
> /jcr:root/Catalogs/catalog_1/Servers//*[@serverID]
> 
> that's probably a lot faster.
> 
> regards
>  marcel
> 
> On Mon, Oct 12, 2009 at 17:44, sidhama <si...@wipro.com> wrote:
>>
>> Sir/Mam,
>> I am executing the following query for getting the counts of Servers.
>> -----------
>> /jcr:root/Catalogs/catalog_1/Servers//*[jcr:like(@serverID, '%')]
>> -----------
>>
>> It has around 150,000 nodes and it takes closely 26 secs for retrieving
>> the
>> results,
>> I modified it to by removing <Servers> folder
>> -----------
>> /jcr:root/Catalogs/catalog_1//*[jcr:like(@serverID, '%')]
>> -----------
>>
>> It is giving a response time of 19secs, can i reduce it further well
>> below
>> 6/7 secs?
>>
>> Please suggest if i could fine tune the query, why any jcr query executed
>> first time takes a longer time, but subsquently takes less time?
>>
>> Thanks
>> Sidharth
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25858002.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25924125.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Fine tunning jcr query

Posted by Marcel Reutegger <mr...@day.com>.
Hi,

like queries with a prefix wildcard are usually expensive. for your
case you rather want to test the existence of the property:

/jcr:root/Catalogs/catalog_1/Servers//*[@serverID]

that's probably a lot faster.

regards
 marcel

On Mon, Oct 12, 2009 at 17:44, sidhama <si...@wipro.com> wrote:
>
> Sir/Mam,
> I am executing the following query for getting the counts of Servers.
> -----------
> /jcr:root/Catalogs/catalog_1/Servers//*[jcr:like(@serverID, '%')]
> -----------
>
> It has around 150,000 nodes and it takes closely 26 secs for retrieving the
> results,
> I modified it to by removing <Servers> folder
> -----------
> /jcr:root/Catalogs/catalog_1//*[jcr:like(@serverID, '%')]
> -----------
>
> It is giving a response time of 19secs, can i reduce it further well below
> 6/7 secs?
>
> Please suggest if i could fine tune the query, why any jcr query executed
> first time takes a longer time, but subsquently takes less time?
>
> Thanks
> Sidharth
>
> --
> View this message in context: http://www.nabble.com/Fine-tunning-jcr-query-tp25858002p25858002.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>