From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com> |
Subject: | Re: xpath processing brain dead |
Date: | 2009-02-28 18:33:05 |
Message-ID: | 49A98361.90102@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
>
>
>
> I'll test again on some longer fragments since you don't seem convinced.
>
>
I set up a test with a much larger XML fragment - over 1Mb - basically
it's the English source of the SVN Turtle book.
The result is that the extra parsing cost is still pretty much unmeasurable:
regression=# select avg(length(foo)) from (select
repeat(xpath('//title',src)::text,i) as foo from xpathtest4,
generate_series(1,100) as i ) x;
avg
----------------------
1309869.000000000000
(1 row)
Without fix:
Time: 5695.930 ms
Time: 4855.837 ms
Time: 5453.044 ms
With fix:
Time: 5232.810 ms
Time: 5272.375 ms
Time: 5528.434 ms
So I'm going to go ahead and commit this change for 8.3, with Tom's
suggested ammendments.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2009-02-28 20:37:52 | Re: xpath processing brain dead |
Previous Message | James Pye | 2009-02-28 18:12:30 | Re: xpath processing brain dead |