Re: [Sedna-discussion] poor performance for large collection

2013-01-16 Thread Robby Pelssers
I decided to write a little unit test omitting any unnecessary code that  might 
result in a performance penalty.

A little bit about my setup:
I use a putty tunnel to connect to a remote sedna instance.


Java Unit test:
package com.nxp.spider2.xmldb.profiling;


import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.xmldb.api.DatabaseManager;
import org.xmldb.api.base.*;
import org.xmldb.api.modules.XQueryService;

import java.util.Date;

public class ChemicalContentTest {

private String databaseURI  = "xmldb:sedna://localhost/nxp";
private String databaseUsername = "SYSTEM";
private String databasePassword = "MANAGER";

@Before
public void setup() {

}

@After
public void tearDown() {

}

@Test
public void getChemicalContentIds() throws XMLDBException {
Date start = new Date();
registerXMLDBDriver();

Collection chemicalcontentCollection = DatabaseManager.getCollection(
databaseURI + "/chemicalContent/released", databaseUsername, 
databasePassword);

XQueryService queryService =

(XQueryService)chemicalcontentCollection.getService("XQueryService","1.0");

ResourceSet resourceSet =
queryService.query("for $doc in 
collection(\"chemicalContent/released\") return document-uri($doc)");

System.out.println("The results were as follows:");
System.out.println("");
ResourceIterator iterator = resourceSet.getIterator();
while(iterator.hasMoreResources())
{
Resource resource = iterator.nextResource();
System.out.println(resource.getContent());
}
System.out.println("");

Date end = new Date();
long duration = end.getTime() - start.getTime();
System.out.println("It took "  + duration / 1000  + " seconds");
}

public void registerXMLDBDriver() throws XMLDBException
{
try
{
Database dbDriver =
(Database)Class.forName(
"net.cfoster.sedna.DatabaseImpl").newInstance();
DatabaseManager.registerDatabase(dbDriver);
}
catch(ClassNotFoundException e) {
System.err.println("ClassNotFoundException: "+
e.getMessage());
}
catch(InstantiationException e) {
System.err.println("InstantiationException: "+
e.getMessage());
}
catch(IllegalAccessException e) {
System.err.println("IllegalAccessException: "+
e.getMessage());
}
}

}

Output console:

--
Sedna XML:DB API Client started, Version 1.2.5 26/Oct/12
Copyright (C) 2007 Charles Foster, www.cfoster.net.
--
The results were as follows:

25860-14Z.xml
25864-19.xml
2PD601ASL_DG.xml
….
74LV14PW_C1.xml
Client did not understand instruction 23, body length = 1446065232.
Exception in thread "Thread-0" java.lang.NullPointerException
at net.cfoster.sedna.xmldb.o.a(Unknown Source)
at net.cfoster.sedna.xmldb.g.c(Unknown Source)
at net.cfoster.sedna.xmldb.g.e(Unknown Source)
at net.cfoster.sedna.xmldb.h.a(Unknown Source)
at net.cfoster.sedna.xmldb.b.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)


It kept running for about a minute at least until it ran into this nullpointer 
exception.

Cheers,
Robby


From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
Sent: Tuesday, January 15, 2013 6:07 PM
To: Charles Foster
Cc: sedna-discussion@lists.sourceforge.net; Ivan Shcheklein
Subject: Re: [Sedna-discussion] poor performance for large collection

Sorry…

My mistake…  I really don’t know why I always mix those  2. For the particular 
test it looks like we use the sedna-xmldb-api.I played with XQJ and Apache 
Cocoon 3 in the past, hence my confusion.

Robby

From: Charles Foster [mailto:char...@cfoster.net]
Sent: Tuesday, January 15, 2013 5:54 PM
To: Robby Pelssers
Cc: Konstantin Abakumov; 
sedna-discussion@lists.sourceforge.net<mailto:sedna-discussion@lists.sourceforge.net>;
 Ivan Shcheklein
Subject: Re: [Sedna-discussion] poor performance for large collection

Do you have some sample XQJ API code that I could see Robby?

Regards,

Charles

On 15 Jan 2013, at 15:07, Robby Pelssers 
mailto:robby.pelss...@nxp.com>> wrote:

Thx for the investigation. We indeed use the  XQJ API.  I guess I will need to 
check out the packaged Java API.

Robby

From: Konstantin Abakumov [mailto:rusabaku...@gmai

Re: [Sedna-discussion] poor performance for large collection

2013-01-15 Thread Charles Foster
Do you have some sample XQJ API code that I could see Robby?

Regards,

Charles

On 15 Jan 2013, at 15:07, Robby Pelssers  wrote:

> Thx for the investigation. We indeed use the  XQJ API.  I guess I will need 
> to check out the packaged Java API. 
>  
> Robby
>  
> From: Konstantin Abakumov [mailto:rusabaku...@gmail.com] 
> Sent: Tuesday, January 15, 2013 3:16 PM
> To: Robby Pelssers
> Cc: sedna-discussion@lists.sourceforge.net; Ivan Shcheklein; Oleg Borisenko
> Subject: Re: [Sedna-discussion] poor performance for large collection
>  
> Hi again!
>  
> I suggest that you are using Sedna XQJ API, is it right?
>  
> I've compared three drivers on your queries:
> 1. Java API
> , packaged with Sedna,
> 2. Sedna XML:DB API
> 3. Sedna XQJ API 
> , both from Charles Foster
>  
> It took only several seconds to execute queries using 1 and 2, but XQJ API 
> worked about half a minute on each query - seems it can be a bottleneck in 
> your case.
>  
> 
> 2013/1/15 Robby Pelssers 
> Hi,
>  
> We use the driver from Charles Foster. But also a test using the Sedna 
> Database Administrator results in temporarily freezing.  It is indeed a 
> remote host. 
>  
> Robby
>  
>  
> From: Konstantin Abakumov [mailto:rusabaku...@gmail.com]
> Sent: Tuesday, January 15, 2013 1:49 AM
> To: Robby Pelssers
> Cc: ???? ?; sedna-discussion@lists.sourceforge.net
> 
> Subject: Re: [Sedna-discussion] poor performance for large collection
>  
> Hello again!
>  
> Sorry for the late reply. And thank you for sending us the data!
>  
> Both the queries you had profiled in previous letters executed fast on my 
> machine:
> for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
> and 
> for $doc in collection("chemicalContent/released") return document-uri($doc)
> 
> it took less than a second to execute each of them. I had executed queries on 
> locally through built-in terminal se_term.
>  
> You noticed that:
> Serializing and sending that data over the wire… takes like forever.. >> 1 
> minute. 
>  
> Seems that slowdown can be achieved during connection to Sedna and sending 
> query results. Is Sedna server located on remote host? What driver do you use?
>  
> --
>  
> I've tried some tests on generated data. As expected, the more schema of 
> individual documents differs from each other, the more performance 
> degradation is observed. But in case of similar or not very different 
> documents (which is yours) Sedna performs satisfactory fast. Hope that we 
> will resolve your performance issue.
>  
> Best regards,
> Konstantin Abakumov
> 
> --
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> ___
> Sedna-discussion mailing list
> Sedna-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
> 
> 
> 
>  
> --
> С уважением,
> Константин Абакумов.
> --
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512___
> Sedna-discussion mailing list
> Sedna-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion

--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


Re: [Sedna-discussion] poor performance for large collection

2013-01-15 Thread Robby Pelssers
Sorry…

My mistake…  I really don’t know why I always mix those  2. For the particular 
test it looks like we use the sedna-xmldb-api.I played with XQJ and Apache 
Cocoon 3 in the past, hence my confusion.

Robby

From: Charles Foster [mailto:char...@cfoster.net]
Sent: Tuesday, January 15, 2013 5:54 PM
To: Robby Pelssers
Cc: Konstantin Abakumov; sedna-discussion@lists.sourceforge.net; Ivan Shcheklein
Subject: Re: [Sedna-discussion] poor performance for large collection

Do you have some sample XQJ API code that I could see Robby?

Regards,

Charles

On 15 Jan 2013, at 15:07, Robby Pelssers 
mailto:robby.pelss...@nxp.com>> wrote:


Thx for the investigation. We indeed use the  XQJ API.  I guess I will need to 
check out the packaged Java API.

Robby

From: Konstantin Abakumov [mailto:rusabaku...@gmail.com<http://gmail.com>]
Sent: Tuesday, January 15, 2013 3:16 PM
To: Robby Pelssers
Cc: 
sedna-discussion@lists.sourceforge.net<mailto:sedna-discussion@lists.sourceforge.net>;
 Ivan Shcheklein; Oleg Borisenko
Subject: Re: [Sedna-discussion] poor performance for large collection

Hi again!

I suggest that you are using Sedna XQJ API, is it right?

I've compared three drivers on your queries:
1. Java API
, packaged with Sedna,
2. Sedna XML:DB API
3. Sedna XQJ API
, both from Charles Foster

It took only several seconds to execute queries using 1 and 2, but XQJ API 
worked about half a minute on each query - seems it can be a bottleneck in your 
case.

2013/1/15 Robby Pelssers mailto:robby.pelss...@nxp.com>>
Hi,

We use the driver from Charles Foster. But also a test using the Sedna Database 
Administrator results in temporarily freezing.  It is indeed a remote host.

Robby


From: Konstantin Abakumov 
[mailto:rusabaku...@gmail.com<mailto:rusabaku...@gmail.com>]
Sent: Tuesday, January 15, 2013 1:49 AM
To: Robby Pelssers
Cc:  ?; 
sedna-discussion@lists.sourceforge.net<mailto:sedna-discussion@lists.sourceforge.net>

Subject: Re: [Sedna-discussion] poor performance for large collection

Hello again!

Sorry for the late reply. And thank you for sending us the data!

Both the queries you had profiled in previous letters executed fast on my 
machine:
for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
and
for $doc in collection("chemicalContent/released") return document-uri($doc)
it took less than a second to execute each of them. I had executed queries on 
locally through built-in terminal se_term.

You noticed that:
Serializing and sending that data over the wire… takes like forever.. >> 1 
minute.

Seems that slowdown can be achieved during connection to Sedna and sending 
query results. Is Sedna server located on remote host? What driver do you use?

--

I've tried some tests on generated data. As expected, the more schema of 
individual documents differs from each other, the more performance degradation 
is observed. But in case of similar or not very different documents (which is 
yours) Sedna performs satisfactory fast. Hope that we will resolve your 
performance issue.

Best regards,
Konstantin Abakumov

--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net<mailto:Sedna-discussion@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/sedna-discussion



--
С уважением,
Константин Абакумов.
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net<mailto:Sedna-discussion@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


Re: [Sedna-discussion] poor performance for large collection

2013-01-15 Thread Robby Pelssers
Thx for the investigation. We indeed use the  XQJ API.  I guess I will need to 
check out the packaged Java API.

Robby

From: Konstantin Abakumov [mailto:rusabaku...@gmail.com]
Sent: Tuesday, January 15, 2013 3:16 PM
To: Robby Pelssers
Cc: sedna-discussion@lists.sourceforge.net; Ivan Shcheklein; Oleg Borisenko
Subject: Re: [Sedna-discussion] poor performance for large collection

Hi again!

I suggest that you are using Sedna XQJ API, is it right?

I've compared three drivers on your queries:
1. Java API
, packaged with Sedna,
2. Sedna XML:DB API
3. Sedna XQJ API
, both from Charles Foster

It took only several seconds to execute queries using 1 and 2, but XQJ API 
worked about half a minute on each query - seems it can be a bottleneck in your 
case.

2013/1/15 Robby Pelssers mailto:robby.pelss...@nxp.com>>
Hi,

We use the driver from Charles Foster. But also a test using the Sedna Database 
Administrator results in temporarily freezing.  It is indeed a remote host.

Robby


From: Konstantin Abakumov 
[mailto:rusabaku...@gmail.com<mailto:rusabaku...@gmail.com>]
Sent: Tuesday, January 15, 2013 1:49 AM
To: Robby Pelssers
Cc:  ?; 
sedna-discussion@lists.sourceforge.net<mailto:sedna-discussion@lists.sourceforge.net>

Subject: Re: [Sedna-discussion] poor performance for large collection

Hello again!

Sorry for the late reply. And thank you for sending us the data!

Both the queries you had profiled in previous letters executed fast on my 
machine:
for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
and
for $doc in collection("chemicalContent/released") return document-uri($doc)
it took less than a second to execute each of them. I had executed queries on 
locally through built-in terminal se_term.

You noticed that:
Serializing and sending that data over the wire… takes like forever.. >> 1 
minute.

Seems that slowdown can be achieved during connection to Sedna and sending 
query results. Is Sedna server located on remote host? What driver do you use?

--

I've tried some tests on generated data. As expected, the more schema of 
individual documents differs from each other, the more performance degradation 
is observed. But in case of similar or not very different documents (which is 
yours) Sedna performs satisfactory fast. Hope that we will resolve your 
performance issue.

Best regards,
Konstantin Abakumov

--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net<mailto:Sedna-discussion@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/sedna-discussion



--
С уважением,
Константин Абакумов.
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


Re: [Sedna-discussion] poor performance for large collection

2013-01-15 Thread Konstantin Abakumov
Hi again!

I suggest that you are using Sedna XQJ API, is it right?

I've compared three drivers on your queries:
1. Java API
, packaged with Sedna,
2. Sedna XML:DB API
3. Sedna XQJ API
, both from Charles Foster

It took only several seconds to execute queries using 1 and 2, but XQJ API
worked about half a minute on each query - seems it can be a bottleneck in
your case.


2013/1/15 Robby Pelssers 

>  Hi,
>
> ** **
>
> We use the driver from Charles Foster. But also a test using the Sedna
> Database Administrator results in temporarily freezing.  It is indeed a
> remote host.  
>
> ** **
>
> Robby
>
> ** **
>
> ** **
>
> *From:* Konstantin Abakumov [mailto:rusabaku...@gmail.com]
> *Sent:* Tuesday, January 15, 2013 1:49 AM
> *To:* Robby Pelssers
> *Cc:*  ?; sedna-discussion@lists.sourceforge.net
>
> *Subject:* Re: [Sedna-discussion] poor performance for large collection***
> *
>
>  ** **
>
> Hello again!
>
> ** **
>
> Sorry for the late reply. And thank you for sending us the data!
>
> ** **
>
> Both the queries you had profiled in previous letters executed fast on my
> machine:
>
> for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
> and
> for $doc in collection("chemicalContent/released") return
> document-uri($doc)
>
> it took less than a second to execute each of them. I had executed queries
> on locally through built-in terminal se_term.
>
> ** **
>
> You noticed that:
>
> Serializing and sending that data over the wire... takes like forever.. >> 1
> minute. 
>
> ** **
>
> Seems that slowdown can be achieved during connection to Sedna and sending
> query results. Is Sedna server located on remote host? What driver do you
> use?
>
> ** **
>
> --
>
> ** **
>
> I've tried some tests on generated data. As expected, the more schema of
> individual documents differs from each other, the more performance
> degradation is observed. But in case of similar or not very different
> documents (which is yours) Sedna performs satisfactory fast. Hope that we
> will resolve your performance issue.
>
> ** **
>
> Best regards,
>
> Konstantin Abakumov
>
>
> --
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> ___
> Sedna-discussion mailing list
> Sedna-discussion@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>
>


-- 
С уважением,
Константин Абакумов.
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


Re: [Sedna-discussion] poor performance for large collection

2013-01-15 Thread Robby Pelssers
Hi,

We use the driver from Charles Foster. But also a test using the Sedna Database 
Administrator results in temporarily freezing.  It is indeed a remote host.

Robby


From: Konstantin Abakumov [mailto:rusabaku...@gmail.com]
Sent: Tuesday, January 15, 2013 1:49 AM
To: Robby Pelssers
Cc:  ?; sedna-discussion@lists.sourceforge.net
Subject: Re: [Sedna-discussion] poor performance for large collection

Hello again!

Sorry for the late reply. And thank you for sending us the data!

Both the queries you had profiled in previous letters executed fast on my 
machine:
for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
and
for $doc in collection("chemicalContent/released") return document-uri($doc)
it took less than a second to execute each of them. I had executed queries on 
locally through built-in terminal se_term.

You noticed that:
Serializing and sending that data over the wire… takes like forever.. >> 1 
minute.

Seems that slowdown can be achieved during connection to Sedna and sending 
query results. Is Sedna server located on remote host? What driver do you use?

--

I've tried some tests on generated data. As expected, the more schema of 
individual documents differs from each other, the more performance degradation 
is observed. But in case of similar or not very different documents (which is 
yours) Sedna performs satisfactory fast. Hope that we will resolve your 
performance issue.

Best regards,
Konstantin Abakumov
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


Re: [Sedna-discussion] poor performance for large collection

2013-01-14 Thread Konstantin Abakumov
Hello again!

Sorry for the late reply. And thank you for sending us the data!

Both the queries you had profiled in previous letters executed fast on my
machine:
for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
and
for $doc in collection("chemicalContent/released") return document-uri($doc)

it took less than a second to execute each of them. I had executed queries
on locally through built-in terminal se_term.

You noticed that:
Serializing and sending that data over the wire… takes like forever.. >> 1
minute.

Seems that slowdown can be achieved during connection to Sedna and sending
query results. Is Sedna server located on remote host? What driver do you
use?

--

I've tried some tests on generated data. As expected, the more schema of
individual documents differs from each other, the more performance
degradation is observed. But in case of similar or not very different
documents (which is yours) Sedna performs satisfactory fast. Hope that we
will resolve your performance issue.

Best regards,
Konstantin Abakumov
--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


Re: [Sedna-discussion] poor performance for large collection

2013-01-14 Thread Олег Борисенко
Yes, it would be great if you give us the collection, it's much easier to
debug with real data :) And we will try to discover the reason as soon as
possible.

P.S: Don't forget to send a copy to
sedna-discussion@lists.sourceforge.net(it's public) or
se...@ispras.ru (it's our private mail) please, it's much easier when all
the team sees what's going on. Thanks!

Best regards, Borisenko Oleg, Sedna team



On Mon, Jan 14, 2013 at 6:31 PM, Robby Pelssers wrote:

>  Hi Oleg,
>
> ** **
>
> I ran following profile statements:
>
>
> **
> 
>
> profile
>
> for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
> 
>
> ** **
>
> which results in 
>
> ** **
>
> http://www.modis.ispras.ru/sedna";>
>
>   14.941
>
> 
>
> http://www.modis.ispras.ru/sedna"/>
>
> http://www.modis.ispras.ru/sedna";>
>
>   
>
> 
> 
>
>   
>
> 
>
>   
>
>   
> 
>
>  position="2:54" time="14.486" calls="24250">
>
>time="1.043" calls="24250">
>
>  position="2:11" time="1.040" calls="24250">
>
>value="chemicalcontent_id" position="2:22" time="0.000" calls="2"/>
>
>position="2:44" time="0.000" calls="2"/>
>
>position="2:11" time="0.000" calls="0"/>
>
> 
>
>   
>
> 
>
>   
>
>calls="48498">
>
>  position="2:72" time="0.008" calls="48498"/>
>
>   
>
> 
>
>   
>
> 
>
>
> **
> 
>
> I also ran following 
>
> ** **
>
> profile
>
> for $doc in collection("chemicalContent/released") return
> document-uri($doc)
>
> ** **
>
> ** **
>
> resulting in 
>
> ** **
>
> http://www.modis.ispras.ru/sedna";>
>
>   1.594
>
> 
>
> http://www.modis.ispras.ru/sedna"/>
>
> http://www.modis.ispras.ru/sedna";>
>
>   
>
> *
> ***
>
>   
>
> 
>
>   
>
>root="collection(chemicalContent/released)" position="2:13" time="1.247"
> calls="24250"/>
>
>calls="48498">
>
>  position="2:72" time="0.012" calls="48498"/>
>
>   
>
> 
>
>   
>
> 
>
> ** **
>
> ** **
>
> BUT !!! 
>
> ** **
>
> Serializing and sending that data over the wire… takes like forever.. >> 1
> minute.  I know it’s like 24k strings in total but it still smells fishy to
> me to be honest.
>
> ** **
>
> Thx upfront…  If you want I can actually zip the collection and make it
> available via dropbox so you can e.g. simulate my issue
>
> ** **
>
> Robby
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* Олег Борисенко [mailto:a...@somestuff.ru]
> *Sent:* Monday, January 14, 2013 2:16 PM
> *To:* Robby Pelssers
> *Subject:* Re: [Sedna-discussion] poor performance for large collection***
> *
>
> ** **
>
> It's difficult to say anything particular in that case. But we have one
> more diagnostic query named "profile", look through documentation here:
> http://www.sedna.org/progguide/ProgGuidesu10.html#x16-650002.7.4. 
>
> Could you send us the output please?
>
> ** **
>
> Best regards, Borisenko Oleg, Sedna team
>
> On Fri, Jan 11, 2013 at 1:58 PM, Robby Pelssers 
> wrote:
>
> Someone on the list gave me following tip:
> *
> for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i)
> - as a result, you will get the keyset of an index, maybe with duplicate
> keys (if they are presented in index), which can be removed with
> distinct-values function.
>
> Here, the blank key to compare with ( &q

Re: [Sedna-discussion] poor performance for large collection

2013-01-11 Thread Robby Pelssers
Someone on the list gave me following tip:
*
for $i in index-scan("chemicalcontent_id", "", "GE")/@id return string($i) - as 
a result, you will get the keyset of an index, maybe with duplicate keys (if 
they are presented in index), which can be removed with distinct-values 
function. 

Here, the blank key to compare with ( "" ) assumed to be less than any other 
key in index.
*

But I tried that and it still is not responsive.  I think Sedna is not using 
the index only but still doing a full collection scan. Can someone shed some 
light on this?

I was also looking a bit into the documentation for how to run an explain plan. 
But to my surprise I don't see anything back of index usage. It's something I 
would typically expect from an explain plan.  

http://www.sedna.org/progguide/ProgGuidesu10.html#x16-640002.7.3



To give an example, I have following index and xquery module
***
create index "package_id"
  on fn:collection("packages/released")/Package
  by @identifier
  as xs:string
***
module namespace packages = "http://www.nxp.com/packages";;

declare function packages:getPackage($id as xs:string) as element(Package)? {
index-scan('package_id', $id, 'EQ')
};
***

Now I tried to explain a method invocation that uses a index:
***
explain
import module namespace packages = "http://www.nxp.com/packages";;
packages:getPackage("SOT669")
***

It shows me following explanation, but no evidence of an index being used.
***
http://www.modis.ispras.ru/sedna"/>
http://www.modis.ispras.ru/sedna";>
  

  

  

***


So any tips on debugging my performance problem are very welcome !!

Thx in advance,
Robby

-Original Message-
From: Robby Pelssers [mailto:robby.pelss...@nxp.com] 
Sent: Thursday, January 10, 2013 12:09 PM
To: sedna-discussion@lists.sourceforge.net
Subject: [Sedna-discussion] poor performance for large collection

Hi all,

I have a single collection of 24468 documents. 

{count(collection("chemicalContent/released")/TypeName)}  == 
24468

When I just try to run below statement it takes very long to execute. The 
documents themselves are not even that big varying between 2kb and 12kb.

for $i in collection("chemicalContent/released") return document-uri($i)

I also have a index on that collection:

create index "chemicalcontent_id"
  on fn:collection("chemicalContent/released")/TypeName
  by @id
  as xs:string

Is it normal for that statement to execute that long   (> 1 minute) ?


Is there a way to perhaps speed up fetching a list of all @id's for that 
particular collection?

Thx in advance,
Robby


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, 
Windows 8 Apps, JavaScript and much more. Keep your skills current with 
LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. 
ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion



--
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion


[Sedna-discussion] poor performance for large collection

2013-01-10 Thread Robby Pelssers
Hi all,

I have a single collection of 24468 documents. 

{count(collection("chemicalContent/released")/TypeName)}  == 
24468

When I just try to run below statement it takes very long to execute. The 
documents themselves are not even that big varying between 2kb and 12kb.

for $i in collection("chemicalContent/released") return document-uri($i)

I also have a index on that collection:

create index "chemicalcontent_id"
  on fn:collection("chemicalContent/released")/TypeName
  by @id
  as xs:string

Is it normal for that statement to execute that long   (> 1 minute) ?


Is there a way to perhaps speed up fetching a list of all @id's for that 
particular collection?

Thx in advance,
Robby


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
Sedna-discussion mailing list
Sedna-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sedna-discussion