Select on big XML-Documents
Hi,
we have some XML-files with different counts of entries. For small files the following select works fine for big files it needs hours.
select anz_eintraege_bestand,
anz_neu,
anz_geaendert,
anz_geloescht
from resource_view rv,
xmltable ('for $e in /lieferung
return <statistik>
<bestand>
{fn:count($e/eintragsbestand/eintrag)}
</bestand>
<neu>
{fn:count($e/eintragsaenderungen/eintrag_anlegen)}
</neu>
<geaendert>
{fn:count($e/eintragsaenderungen/eintrag_pflegen)}
</geaendert>
<geloescht>
{fn:count($e/eintragsaenderungen/eintrag_loeschen)}
</geloescht>
</statistik>
'
PASSING XDBURITYPE (pResourcePath).getxml()
returning content
)
columns anz_eintraege_bestand number (10) path '/statistik/bestand',
anz_neu number (10) path '/statistik/neu',