From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Ali Akbar <the(dot)apaan(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [REVIEW] Re: Fix xpath() to return namespace definitions |
Date: | 2014-12-11 14:51:45 |
Message-ID: | 5489AF81.8070709@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/5/14 9:50 AM, Ali Akbar wrote:
> I noticed somewhat big performance regression if the xml is large (i use
> PRODML Product Volume sample from energistics.org <http://energistics.org>):
> * Without patch (tested 3 times):
> select unnest(xpath('//a:flow', x,
> ARRAY[['a','http://www.prodml.org/schemas/1series']])) from u;
> Time: 84,012 ms
> Time: 85,683 ms
> Time: 88,766 ms
> * With latest v6 patch (notice the correct result with namespace
> definition):
>
> select unnest(xpath('//a:flow', x,
> ARRAY[['a','http://www.prodml.org/schemas/1series']])) from u;
> Time: 108,912 ms
> Time: 108,267 ms
> Time: 114,848 ms
>
>
> It's 23% performance regression.
>
> * Just curious, i'm also testing v5 patch performance (notice the
> namespace in the result):
> select unnest(xpath('//a:flow', x,
> ARRAY[['a','http://www.prodml.org/schemas/1series']])) from u;
> Time: 92,552 ms
> Time: 97,440 ms
> Time: 99,309 ms
>
> The regression is only 13%. I know the xmlCopyNode() version (v6 patch)
> is much more cleaner than v5patch, should we consider the performance
> benefit?
I ran a test using postgres-US.fo built in the PostgreSQL source tree,
which is 38 MB, and ran
select unnest(xpath('//fo:bookmark-title', b, array[array['fo',
'http://www.w3.org/1999/XSL/Format']])) from data;
(Table contains one row only.)
The timings were basically indistinguishable between the three code
versions.
I'll try to reproduce your test. How big is your file? Do you have a
link to the actual file? Could you share your load script?
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2014-12-11 15:06:16 | Re: Commitfest problems |
Previous Message | Marco Nenciarini | 2014-12-11 14:21:03 | Re: Too strict check when starting from a basebackup taken off a standby |