You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Patrick Percot <pp...@free.fr> on 2004/02/29 09:09:54 UTC

Use of indexes

Hello,

I  have made  some  tests  on xindice.  It  seems to  be  fast for  some
operations, but a bit slow while performing xpath operations. 

I tried to add an index on the tag used in the requests, but it took the
same time with the index than without it.

What's the reason ? 



patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb:xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
[DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'

[....]

<titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">1396 W : distribution de l&apos;énergie électrique</titleproper>

real	1m43.576s
user	0m1.470s
sys	0m0.060s


patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice add_indexer -c xmldb:xindice://muaddib:8080/db/AD56 -n indextitleproper -p titleproper
[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
[DEBUG] CollectionImpl - -Using URL: 'http://muaddib:8080/xindice/'
CREATED : indextitleproper
 
real    0m2.488s
user    0m1.700s
sys     0m0.070s

(Indexation seems to be performed in background)

patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb :xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
[DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'

[....]

<titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">139 6 W : distribution de l&apos;énergie électrique</titleproper>
 
real    1m42.310s
user    0m1.490s
sys     0m0.090s


A+
PP
-- 
Groupe Morbihannais d'Utilisateurs de Logiciels Libres http://www.tuxbihan.org
Identifiant Jabber: pp@amessage.de
GPG fingerprint = 1A4F E154 3D2C A20E E4CA  A543 7951 C5C2 E44A A0B5

Patrick Percot.

Re: Use of indexes

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Patrick Percot wrote:

>From: Terry Rosenbaum <Te...@amicas.com>
>
>  
>
>>If you need help with indexed query performance,
>>you need to send us your XPATH querys
>>that you used in your tests. A simplified sample
>>of the documents you are indexing (at least
>>showing the structure of the main document
>>and indexed elements/attributes) would be useful too. 
>>    
>>
>
>OK, 
>
>The request : //titleproper[contains(.,'1396')]
>  
>

http://marc.theaimsgroup.com/?l=xindice-users&m=107739259325548&w=2


Vadim


Re: Use of indexes

Posted by Patrick Percot <pp...@free.fr>.
From: Terry Rosenbaum <Te...@amicas.com>
Subject: Re: Use of indexes
Date: Sun, 29 Feb 2004 08:42:00 -0500

> If you need help with indexed query performance,
> you need to send us your XPATH querys
> that you used in your tests. A simplified sample
> of the documents you are indexing (at least
> showing the structure of the main document
> and indexed elements/attributes) would be useful too. 

OK, 

The request : //titleproper[contains(.,'1396')]

An extract of the document :
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="Repertoire-simple.xsl"?>
<ead audience="external">
	<eadheader>
		<eadid>1396W</eadid>
		<filedesc>
			<titlestmt>
				<titleproper>1396 W : distribution de l'énergie électrique</titleproper>
				<subtitle>1961-1997</subtitle>
				<author>par Auteur</author>
			</titlestmt>
			<publicationstmt>
				<publisher>Archives départementales</publisher>
				<address>
					<addressline>50</addressline>
				</address>
				<date>2003</date>
			</publicationstmt>
		</filedesc>
		<profiledesc>
			<creation>
Instrument de recherche encodé sur le logiciel Arkhéïa Aide au classement de la société Anaphore sarl
<date>08/10/2003</date>
			</creation>
			<langusage>Français</langusage>
		</profiledesc>
	</eadheader>

... 

</ead>

The index creation :

xindice add_indexer -c xmldb:xindice://muaddib:8080/db/AD56 -n indextitleproper -p titleproper

Thanks

> 
> -Terry
> 
> Patrick Percot wrote:
> 
> >From: Patrick Percot <pp...@free.fr>
> >Subject: Use of indexes
> >Date: Sun, 29 Feb 2004 09:09:54 +0100 (CET)
> >
> >  
> >
> >>Hello,
> >>
> >>I  have made  some  tests  on xindice.  It  seems to  be  fast for  some
> >>operations, but a bit slow while performing xpath operations. 
> >>
> >>I tried to add an index on the tag used in the requests, but it took the
> >>same time with the index than without it.
> >>
> >>What's the reason ? 
> >>
> >>    
> >>
> >
> >I forgot  to say  that those tests  where performed  with 120 Mo  of XML
> >files of  different sizes  (200 files  from 200Ko to  2Mo), on  a laptop
> >equipped of a Duron 1GhZ with 256  Mo of memory.  I know that a 2Ghz 512
> >Mo machine would be a better choice.
> >
> >  
> >
> >>patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb:xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
> >>[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
> >>[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
> >>[DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'
> >>
> >>[....]
> >>
> >><titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">1396 W : distribution de l&apos;énergie électrique</titleproper>
> >>
> >>real	1m43.576s
> >>user	0m1.470s
> >>sys	0m0.060s
> >>
> >>
> >>patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice add_indexer -c xmldb:xindice://muaddib:8080/db/AD56 -n indextitleproper -p titleproper
> >>[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
> >>[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
> >>[DEBUG] CollectionImpl - -Using URL: 'http://muaddib:8080/xindice/'
> >>CREATED : indextitleproper
> >> 
> >>real    0m2.488s
> >>user    0m1.700s
> >>sys     0m0.070s
> >>
> >>(Indexation seems to be performed in background)
> >>
> >>patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb :xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
> >>[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
> >>[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
> >>[DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'
> >>
> >>[....]
> >>
> >><titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">139 6 W : distribution de l&apos;énergie électrique</titleproper>
> >> 
> >>real    1m42.310s
> >>user    0m1.490s
> >>sys     0m0.090s
> >>
> >>
> >>A+
> >>PP
> >>-- 
> >>Groupe Morbihannais d'Utilisateurs de Logiciels Libres http://www.tuxbihan.org
> >>Identifiant Jabber: pp@amessage.de
> >>GPG fingerprint = 1A4F E154 3D2C A20E E4CA  A543 7951 C5C2 E44A A0B5
> >>
> >>Patrick Percot.
> >>
> >>    
> >>
> >
> >A+
> >PP
> >  
> >
> 

A+
PP
-- 
Groupe Morbihannais d'Utilisateurs de Logiciels Libres http://www.tuxbihan.org
Identifiant Jabber: pp@amessage.de
GPG fingerprint = 1A4F E154 3D2C A20E E4CA  A543 7951 C5C2 E44A A0B5

Patrick Percot.

Re: Use of indexes

Posted by Terry Rosenbaum <Te...@amicas.com>.
If you need help with indexed query performance,
you need to send us your XPATH querys
that you used in your tests. A simplified sample
of the documents you are indexing (at least
showing the structure of the main document
and indexed elements/attributes) would be useful too.

-Terry

Patrick Percot wrote:

>From: Patrick Percot <pp...@free.fr>
>Subject: Use of indexes
>Date: Sun, 29 Feb 2004 09:09:54 +0100 (CET)
>
>  
>
>>Hello,
>>
>>I  have made  some  tests  on xindice.  It  seems to  be  fast for  some
>>operations, but a bit slow while performing xpath operations. 
>>
>>I tried to add an index on the tag used in the requests, but it took the
>>same time with the index than without it.
>>
>>What's the reason ? 
>>
>>    
>>
>
>I forgot  to say  that those tests  where performed  with 120 Mo  of XML
>files of  different sizes  (200 files  from 200Ko to  2Mo), on  a laptop
>equipped of a Duron 1GhZ with 256  Mo of memory.  I know that a 2Ghz 512
>Mo machine would be a better choice.
>
>  
>
>>patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb:xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
>>[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
>>[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
>>[DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'
>>
>>[....]
>>
>><titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">1396 W : distribution de l&apos;énergie électrique</titleproper>
>>
>>real	1m43.576s
>>user	0m1.470s
>>sys	0m0.060s
>>
>>
>>patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice add_indexer -c xmldb:xindice://muaddib:8080/db/AD56 -n indextitleproper -p titleproper
>>[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
>>[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
>>[DEBUG] CollectionImpl - -Using URL: 'http://muaddib:8080/xindice/'
>>CREATED : indextitleproper
>> 
>>real    0m2.488s
>>user    0m1.700s
>>sys     0m0.070s
>>
>>(Indexation seems to be performed in background)
>>
>>patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb :xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
>>[DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
>>[DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
>>[DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'
>>
>>[....]
>>
>><titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">139 6 W : distribution de l&apos;énergie électrique</titleproper>
>> 
>>real    1m42.310s
>>user    0m1.490s
>>sys     0m0.090s
>>
>>
>>A+
>>PP
>>-- 
>>Groupe Morbihannais d'Utilisateurs de Logiciels Libres http://www.tuxbihan.org
>>Identifiant Jabber: pp@amessage.de
>>GPG fingerprint = 1A4F E154 3D2C A20E E4CA  A543 7951 C5C2 E44A A0B5
>>
>>Patrick Percot.
>>
>>    
>>
>
>A+
>PP
>  
>

Re: Use of indexes

Posted by Patrick Percot <pp...@free.fr>.
From: Patrick Percot <pp...@free.fr>
Subject: Use of indexes
Date: Sun, 29 Feb 2004 09:09:54 +0100 (CET)

> Hello,
> 
> I  have made  some  tests  on xindice.  It  seems to  be  fast for  some
> operations, but a bit slow while performing xpath operations. 
> 
> I tried to add an index on the tag used in the requests, but it took the
> same time with the index than without it.
> 
> What's the reason ? 
> 

I forgot  to say  that those tests  where performed  with 120 Mo  of XML
files of  different sizes  (200 files  from 200Ko to  2Mo), on  a laptop
equipped of a Duron 1GhZ with 256  Mo of memory.  I know that a 2Ghz 512
Mo machine would be a better choice.

> 
> 
> patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb:xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
> [DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
> [DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
> [DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'
> 
> [....]
> 
> <titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">1396 W : distribution de l&apos;énergie électrique</titleproper>
> 
> real	1m43.576s
> user	0m1.470s
> sys	0m0.060s
> 
> 
> patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice add_indexer -c xmldb:xindice://muaddib:8080/db/AD56 -n indextitleproper -p titleproper
> [DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
> [DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
> [DEBUG] CollectionImpl - -Using URL: 'http://muaddib:8080/xindice/'
> CREATED : indextitleproper
>  
> real    0m2.488s
> user    0m1.700s
> sys     0m0.070s
> 
> (Indexation seems to be performed in background)
> 
> patrick@muaddib:/usr/src/CDS/SRD/Exemples/liens$ time /usr/local/xindice-1.1b3/bin/xindice xpath -c xmldb :xindice://localhost:8080/db/AD56 -q `cat ~/dess-asir/projet/tests/xindice/xindice-rq2`
> [DEBUG] DatabaseImpl - -Using SAX Driver: 'xerces'
> [DEBUG] DatabaseImpl - -Using Service Location: '/xindice/'
> [DEBUG] CollectionImpl - -Using URL: 'http://localhost:8080/xindice/'
> 
> [....]
> 
> <titleproper xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/AD56" src:key="f9-AD50.xml">139 6 W : distribution de l&apos;énergie électrique</titleproper>
>  
> real    1m42.310s
> user    0m1.490s
> sys     0m0.090s
> 
> 
> A+
> PP
> -- 
> Groupe Morbihannais d'Utilisateurs de Logiciels Libres http://www.tuxbihan.org
> Identifiant Jabber: pp@amessage.de
> GPG fingerprint = 1A4F E154 3D2C A20E E4CA  A543 7951 C5C2 E44A A0B5
> 
> Patrick Percot.
> 

A+
PP
-- 
Groupe Morbihannais d'Utilisateurs de Logiciels Libres http://www.tuxbihan.org
Identifiant Jabber: pp@amessage.de
GPG fingerprint = 1A4F E154 3D2C A20E E4CA  A543 7951 C5C2 E44A A0B5

Patrick Percot.