XML Database (MOSC)

MOSC Banner

Select on big XML-Documents

edited Oct 1, 2014 2:54AM in XML Database (MOSC) 6 commentsAnswered

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',

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center