[HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Pavel Stehule
Hello I testing a simple use case and I was surprised with very slow execution of SQL functions create or replace function empty_string1(text) returns bool as $$ select $1 is NULL or $1 = '' $$ language sql; postgres=# select count(empty_string1(CASE WHEN random() 0.5 THEN NULL ELSE 'x' END))

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Marko Tiikkaja
On 29 Aug 2010, at 13:20, Pavel Stehule pavel.steh...@gmail.com wrote: Is strange - so slow function can be replaced by plpgsql function and it's faster All your SQL language functions were VOLATILE. Regards, Marko Tiikkaja -- Sent via pgsql-hackers mailing list

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Pavel Stehule
Hello 2010/8/29 Marko Tiikkaja marko.tiikk...@cs.helsinki.fi: On 29 Aug 2010, at 13:20, Pavel Stehule pavel.steh...@gmail.com wrote: Is strange - so slow function can be replaced by plpgsql function and it's faster All your SQL language functions were VOLATILE. It's not a problem -

Re: [HACKERS] [BUGS] BUG #5305: Postgres service stops when closing Windows session

2010-08-29 Thread Magnus Hagander
On Thu, Aug 26, 2010 at 22:59, Cristian Bittel cbit...@gmail.com wrote: I still believe this exit code 128 is related to pgAdmin opened during the clossing session on Remote Desktop. I have a Windows user login wich is not administrator just no privileged user, it cannot start/stop services,

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: I testing a simple use case and I was surprised with very slow execution of SQL functions The one case is inline-able and the other not (because it would result in double evaluation of the volatile function random()). See EXPLAIN VERBOSE.

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Pavel Stehule
2010/8/29 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: I testing a simple use case and I was surprised with very slow execution of SQL functions The one case is inline-able and the other not (because it would result in double evaluation of the volatile function

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2010/8/29 Tom Lane t...@sss.pgh.pa.us: The one case is inline-able and the other not (because it would result in double evaluation of the volatile function random()). See EXPLAIN VERBOSE. I understand now. So it means general advice - don't use a

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Pavel Stehule
2010/8/29 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2010/8/29 Tom Lane t...@sss.pgh.pa.us: The one case is inline-able and the other not (because it would result in double evaluation of the volatile function random()). See EXPLAIN VERBOSE. I understand now.

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Martijn van Oosterhout
On Sun, Aug 29, 2010 at 11:23:29AM -0400, Tom Lane wrote: Pavel Stehule pavel.steh...@gmail.com writes: I understand now. So it means general advice - don't use a boolean operators in SQL function? This issue should be documented somewhere? It has nothing to do with boolean operators, just

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Tom Lane
Martijn van Oosterhout klep...@svana.org writes: On Sun, Aug 29, 2010 at 11:23:29AM -0400, Tom Lane wrote: It has nothing to do with boolean operators, just double evaluation. I was wondering, wouldn't it be possible to avoid the double evaluation by simply creating an extra slot for the

Re: [HACKERS] performance issue: logical operators are slow inside SQL function: missing optimalization?

2010-08-29 Thread Pavel Stehule
2010/8/29 Tom Lane t...@sss.pgh.pa.us: Martijn van Oosterhout klep...@svana.org writes: On Sun, Aug 29, 2010 at 11:23:29AM -0400, Tom Lane wrote: It has nothing to do with boolean operators, just double evaluation. I was wondering, wouldn't it be possible to avoid the double evaluation by

[HACKERS] huia and moa versus old PG branches

2010-08-29 Thread Tom Lane
The new buildfarm machines huia and moa aren't doing terribly well with the older PG branches. This isn't really those machines' fault; what I find after a bit of digging is that we just didn't have good support for 64-bit Solaris until relatively recently. In particular: * There was no 64-bit

[HACKERS] upcoming wraps

2010-08-29 Thread Robert Haas
Apologies if this has already been covered, but do we have dates yet for the next (and in the case of 7.4 and 8.0, final) set of point releases? And what about 9.1alpha1? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-hackers mailing

Re: [HACKERS] git: uh-oh

2010-08-29 Thread Robert Haas
On Wed, Aug 25, 2010 at 2:39 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Aug 25, 2010 at 1:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: The fact that the file was modified twice after being removed at rev 2.88 seems really wacko.  Are you sure

Re: [HACKERS] upcoming wraps

2010-08-29 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Apologies if this has already been covered, but do we have dates yet for the next (and in the case of 7.4 and 8.0, final) set of point releases? No. And what about 9.1alpha1? Peter muttered something about doing that this week.

Re: [HACKERS] huia and moa versus old PG branches

2010-08-29 Thread Tom Lane
I wrote: what I find after a bit of digging is that we just didn't have good support for 64-bit Solaris until relatively recently. In particular: BTW, just for the record: it's Solaris on 64-bit Intel that's at issue. 64-bit Sparc support goes way back, as evidenced by the fact that