Re: [PERFORM] Small performance regression in 9.2 has a big impact

2014-11-25 Thread Tom Lane
I wrote: >> Hmm, I don't like the trend here. For the repeat-1000x query, I get >> these reported execution times: >> 8.4 360 ms >> 9.0 365 ms >> 9.1 440 ms >> 9.2 510 ms >> 9.3 550 ms >> 9.4 570 ms >> head 570 ms > I made a quick-hack patch to suppress redundant GetDefaultOpclass calls >

Re: [PERFORM] Small performance regression in 9.2 has a big impact

2014-11-25 Thread Tom Lane
Scott Marlowe writes: > On Tue, Nov 25, 2014 at 1:58 PM, Heikki Linnakangas > wrote: >> I don't know why this regressed between those versions, but looking at the >> functions, there's some low-hanging fruit: >> >> 1. tree_ancestor_keys() could use UNION ALL instead of UNION. (I believe >> dupli

Re: [PERFORM] Small performance regression in 9.2 has a big impact

2014-11-25 Thread Tom Lane
I wrote: > Scott Marlowe writes: >> OK so there's a simple set of tree functions we use at work. They're >> quite fast in 8.4 and they've gotten about 40% slower in 9.2. > Hmm, I don't like the trend here. For the repeat-1000x query, I get > these reported execution times: > 8.4 360 ms > 9.0

Re: [PERFORM] Small performance regression in 9.2 has a big impact

2014-11-25 Thread Scott Marlowe
On Tue, Nov 25, 2014 at 1:58 PM, Heikki Linnakangas wrote: > On 11/25/2014 10:36 PM, Scott Marlowe wrote: >> >> OK so there's a simple set of tree functions we use at work. They're >> quite fast in 8.4 and they've gotten about 40% slower in 9.2. They're >> a simple mix of sql and plpgsql functions

Re: [PERFORM] Small performance regression in 9.2 has a big impact

2014-11-25 Thread Tom Lane
Scott Marlowe writes: > OK so there's a simple set of tree functions we use at work. They're > quite fast in 8.4 and they've gotten about 40% slower in 9.2. They're > a simple mix of sql and plpgsql functions which are at > http://pastebin.com/SXTnNhd5 and which I've attached. > Here's a test que

Re: [PERFORM] Small performance regression in 9.2 has a big impact

2014-11-25 Thread Heikki Linnakangas
On 11/25/2014 10:36 PM, Scott Marlowe wrote: OK so there's a simple set of tree functions we use at work. They're quite fast in 8.4 and they've gotten about 40% slower in 9.2. They're a simple mix of sql and plpgsql functions which are at http://pastebin.com/SXTnNhd5 and which I've attached. Her

[PERFORM] Small performance regression in 9.2 has a big impact

2014-11-25 Thread Scott Marlowe
OK so there's a simple set of tree functions we use at work. They're quite fast in 8.4 and they've gotten about 40% slower in 9.2. They're a simple mix of sql and plpgsql functions which are at http://pastebin.com/SXTnNhd5 and which I've attached. Here's a test query: select tree_ancestor_keys('0