Skip site navigation (1) Skip section navigation (2)

Re: xpath processing brain dead

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: (view raw, whole thread or download thread mbox)
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;
(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.



In response to

pgsql-hackers by date

Next:From: Hannu KrosingDate: 2009-02-28 20:37:52
Subject: Re: xpath processing brain dead
Previous:From: James PyeDate: 2009-02-28 18:12:30
Subject: Re: xpath processing brain dead

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group