You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Jinsuo Zhang <ji...@cise.ufl.edu> on 2002/03/05 21:29:55 UTC

does index affect speed much?

Hi,
  When I create a collection and insert tens of documents into it.
it seems xpath will not be affected much by index, is it normal
or I did sth wrong? It takes 5 seconds with or w/o index anyway.
  thanks.

-- 
Jinsuo Zhang

CISE department
Univ of Florida


Re: does index affect speed much?

Posted by Kimbro Staken <ks...@xmldatabases.org>.
On Tuesday, March 5, 2002, at 01:29 PM, Jinsuo Zhang wrote:

> Hi,
>   When I create a collection and insert tens of documents into it.
> it seems xpath will not be affected much by index, is it normal
> or I did sth wrong? It takes 5 seconds with or w/o index anyway.
>   thanks.
>

How much it helps depends on how many documents you have and the type of 
queries you're running. For tens of documents it probably doesn't make 
much difference, but for thousands it makes a very substantial difference.

> --
> Jinsuo Zhang
>
> CISE department
> Univ of Florida
>
>
Kimbro Staken - http://www.kstaken.org - http://www.xmldatabases.org
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org
Senior Technologist (Your company name here)


Re: does index affect speed much?

Posted by Kimbro Staken <ks...@xmldatabases.org>.
One thing to look at is to make sure that the IP address of the machine 
resolves to a hostname. The ORB will do these lookups which can really 
slow down VM startup. The ORB will also write the hostname to the IOR, so 
if resolution of that name is slow it will have this effect. It has to be 
something along this line as there is nothing in the platforms that would 
account for this. For me I see slightly better startup times on Windows 
and Linux then I do on Mac OS X.

On Wednesday, March 6, 2002, at 05:10 PM, Mark J. Stang wrote:

> I checked on Linux and it takes about 150 ms vs 16000 on the NT
> box.   Same network...   I will try it on a 98 box and see what happens.
> I will also be running the code on the Macs tomorrow and can see if I
> can figure out the times there.   Any error checking or debug info
> we can turn on that might give us a hint?
>
> Mark
>
> Tom Bradford wrote:
>
Kimbro Staken - http://www.kstaken.org - http://www.xmldatabases.org
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org
Senior Technologist (Your company name here)


Re: does index affect speed much?

Posted by "Mark J. Stang" <ma...@earthlink.net>.
I checked on Linux and it takes about 150 ms vs 16000 on the NT
box.   Same network...   I will try it on a 98 box and see what happens.
I will also be running the code on the Macs tomorrow and can see if I
can figure out the times there.   Any error checking or debug info
we can turn on that might give us a hint?

Mark

Tom Bradford wrote:

> On Wednesday, March 6, 2002, at 03:08 PM, Mark J. Stang wrote:
> > I did some timing tests and was able to discover that the first access
> > of
> > a
> > collection was painfully slow on NT, haven't tried the Mac yet.   I
> > implemented
> > a collection pool.   The first access of the collection was taking 15 to
> > 16 seconds
> > on the NT machine.   Subsequent accesses very fast.   Did a little
> > looking
> > and
> > registering the database is taking all the time 16303 ms.   So that
> > means
> > any
> > command-line tool will take at least 16000 ms. to run a command.   Any
> > idea
> > why?   I understand you don't have a NT box to work with...
>
> I'm guessing the delay is an erroneous lookup of some kind, possibly the
> web server or ORB attempting to do a Reverse DNS and timing out.  I'm
> not sure why it would not work on one Mac and work on the other.  I have
> a G4 Powerbook and haven't had any problems of this nature.
> Unfortunately, I only have limited ability to test on NT (Virtual PC on
> the Mac)
>
> --
> Tom Bradford - http://www.tbradford.org
> Architect - XQRL (XQuery Engine) - http://www.xqrl.com
> Apache Xindice (Native XML Database) - http://xml.apache.org/xindice
> Project Labrador (Web Services Framework) - http://notdotnet.org


Re: does index affect speed much?

Posted by Tom Bradford <to...@xqrl.com>.
On Wednesday, March 6, 2002, at 03:08 PM, Mark J. Stang wrote:
> I did some timing tests and was able to discover that the first access 
> of
> a
> collection was painfully slow on NT, haven't tried the Mac yet.   I
> implemented
> a collection pool.   The first access of the collection was taking 15 to
> 16 seconds
> on the NT machine.   Subsequent accesses very fast.   Did a little 
> looking
> and
> registering the database is taking all the time 16303 ms.   So that 
> means
> any
> command-line tool will take at least 16000 ms. to run a command.   Any
> idea
> why?   I understand you don't have a NT box to work with...

I'm guessing the delay is an erroneous lookup of some kind, possibly the 
web server or ORB attempting to do a Reverse DNS and timing out.  I'm 
not sure why it would not work on one Mac and work on the other.  I have 
a G4 Powerbook and haven't had any problems of this nature.  
Unfortunately, I only have limited ability to test on NT (Virtual PC on 
the Mac)

--
Tom Bradford - http://www.tbradford.org
Architect - XQRL (XQuery Engine) - http://www.xqrl.com
Apache Xindice (Native XML Database) - http://xml.apache.org/xindice
Project Labrador (Web Services Framework) - http://notdotnet.org


Re: does index affect speed much?

Posted by "Mark J. Stang" <ma...@earthlink.net>.
Tom,
I am starting to move my application to different platforms.   I have it
running
on Red Hat 7.2.   I tried it on a dual processor mac(OS X), had
problems.   Ran it on
a single processor mac laptop and desktop, no problems with Xindice,
network
issues on the laptop.   Ported it to Window NT.   Had problems, similar to
the
dual processor mac.

I did some timing tests and was able to discover that the first access of
a
collection was painfully slow on NT, haven't tried the Mac yet.   I
implemented
a collection pool.   The first access of the collection was taking 15 to
16 seconds
on the NT machine.   Subsequent accesses very fast.   Did a little looking
and
registering the database is taking all the time 16303 ms.   So that means
any
command-line tool will take at least 16000 ms. to run a command.   Any
idea
why?   I understand you don't have a NT box to work with...

Mark

Tom Bradford wrote:

> On Wednesday, March 6, 2002, at 12:30 PM, Jinsuo Zhang wrote:
> > yes, It seems strange, I use command line, is it a factor?
> > actually the xml documents are very small, about 1K bytes each.
> > I use linux "time" command to measure time, it reports that
> > 4 seconds is from user usage, 0.5 second for system usage.
> > Is it because the slow start of java VM?
>
> I'd say nearly all of that time is the VM startup overhead in addition
> to the CORBA connection overhead.  The best way to get an idea of true
> performance is to do it programmatically rather than time the command
> line tools.
>
> --
> Tom Bradford - http://www.tbradford.org
> Architect - XQRL (XQuery Engine) - http://www.xqrl.com
> Apache Xindice (Native XML Database) - http://xml.apache.org/xindice
> Project Labrador (Web Services Framework) - http://notdotnet.org


Re: does index affect speed much?

Posted by Tom Bradford <to...@xqrl.com>.
On Wednesday, March 6, 2002, at 12:30 PM, Jinsuo Zhang wrote:
> yes, It seems strange, I use command line, is it a factor?
> actually the xml documents are very small, about 1K bytes each.
> I use linux "time" command to measure time, it reports that
> 4 seconds is from user usage, 0.5 second for system usage.
> Is it because the slow start of java VM?

I'd say nearly all of that time is the VM startup overhead in addition 
to the CORBA connection overhead.  The best way to get an idea of true 
performance is to do it programmatically rather than time the command 
line tools.

--
Tom Bradford - http://www.tbradford.org
Architect - XQRL (XQuery Engine) - http://www.xqrl.com
Apache Xindice (Native XML Database) - http://xml.apache.org/xindice
Project Labrador (Web Services Framework) - http://notdotnet.org


Re: does index affect speed much?

Posted by Jinsuo Zhang <ji...@cise.ufl.edu>.
> On Tuesday, March 5, 2002, at 01:29 PM, Jinsuo Zhang wrote:
> >   When I create a collection and insert tens of documents into it.
> > it seems xpath will not be affected much by index, is it normal
> > or I did sth wrong? It takes 5 seconds with or w/o index anyway.
> >   thanks.
> 
> Woah.. 5 seconds for tens of documents.  How big are these documents?

yes, It seems strange, I use command line, is it a factor?
actually the xml documents are very small, about 1K bytes each.
I use linux "time" command to measure time, it reports that
4 seconds is from user usage, 0.5 second for system usage.
Is it because the slow start of java VM?

thanks.
> 
> --
> Tom Bradford - http://www.tbradford.org
> Architect - XQRL (XQuery Engine) - http://www.xqrl.com
> Apache Xindice (Native XML Database) - http://xml.apache.org/xindice
> Project Labrador (Web Services Framework) - http://notdotnet.org
> 
> 


Re: does index affect speed much?

Posted by Tom Bradford <to...@xqrl.com>.
On Tuesday, March 5, 2002, at 01:29 PM, Jinsuo Zhang wrote:
>   When I create a collection and insert tens of documents into it.
> it seems xpath will not be affected much by index, is it normal
> or I did sth wrong? It takes 5 seconds with or w/o index anyway.
>   thanks.

Woah.. 5 seconds for tens of documents.  How big are these documents?

--
Tom Bradford - http://www.tbradford.org
Architect - XQRL (XQuery Engine) - http://www.xqrl.com
Apache Xindice (Native XML Database) - http://xml.apache.org/xindice
Project Labrador (Web Services Framework) - http://notdotnet.org