Re: [PERFORM] immutable functions vs. join for lookups ?

2005-04-17 Thread Enrico Weigelt
* Tom Lane [EMAIL PROTECTED] wrote: Enrico Weigelt [EMAIL PROTECTED] writes: c) CREATE FUNCTION id2username(oid) RETURNS text LANGUAGE 'SQL' IMMUTABLE AS ' SELECT username AS RESULT FROM users WHERE uid = $1'; This is simply dangerous. The function is *NOT* immutable (it is

Re: [PERFORM] immutable functions vs. join for lookups ?

2005-04-17 Thread Jaime Casanova
On 4/17/05, Enrico Weigelt [EMAIL PROTECTED] wrote: * Tom Lane [EMAIL PROTECTED] wrote: Enrico Weigelt [EMAIL PROTECTED] writes: c) CREATE FUNCTION id2username(oid) RETURNS text LANGUAGE 'SQL' IMMUTABLE AS ' SELECT username AS RESULT FROM users WHERE uid = $1'; This is

Re: [PERFORM] plperl vs plpgsql

2005-04-17 Thread Alex
Is there a performance difference between the two? which of the PL is most widely used. One problem i have with the plpgsql is that the quoting is really a pain. Christopher Browne wrote: After takin a swig o' Arrakan spice grog, [EMAIL PROTECTED] (Alex) belched out: i am thinking about

Re: [PERFORM] plperl vs plpgsql

2005-04-17 Thread Stefan Weiss
On 2005-04-17 14:56, Alex wrote: Is there a performance difference between the two? As Christopher already pointed out, it depends on what you want to do. If you're doing some complex string processing, it will be easier (and in some cases) faster to do in plperl, if you're mainly dealing with

Re: [PERFORM] plperl vs plpgsql

2005-04-17 Thread Joshua D. Drake
On Sun, 17 Apr 2005, Alex wrote: Is there a performance difference between the two? Hello, It depends on what you are using it for. My experience is that for some reason plPGSQL is faster when looping but other than that they should be very similar. which of the PL is most widely used. One

[PERFORM] refcurosr vs. setof

2005-04-17 Thread RĂ¼diger Herrmann
Hello, I need to write several PL/pgSQL functions all returning a result set wich can be obtained by a single SELECT statement. For now the functions are called by a Java application. Both REFCURSOR and SETOF serve my purpose, but I was wondering if there is a perfonance difference between the

Re: [PERFORM] plperl vs plpgsql

2005-04-17 Thread Christopher Browne
After a long battle with technology, [EMAIL PROTECTED] (Alex), an earthling, wrote: Christopher Browne wrote: After takin a swig o' Arrakan spice grog, [EMAIL PROTECTED] (Alex) belched out: i am thinking about swiching to plperl as it seems to me much more flexible and easier to create

[PERFORM] Postgresql works too slow

2005-04-17 Thread Nurlan Mukhanov (AL/EKZ)
Hello. I'm trying to restore my database from dump in several parrallel processes, but restore process works too slow. Number of rows about 100 000 000, RAM: 8192M CPU: Ultra Sparc 3 Number of CPU: 4 OS: SunOS sun 5.8 RDBMS: PostgreSQL 8.0 prstat info

Re: [PERFORM] Postgresql works too slow

2005-04-17 Thread Steve Poe
Nurlan, Try enabliing your checkpoint_segments. In my example, our database restore took 75mins. After enabling checkpoints_segments to 20, we cut it down to less than 30 minutes. Is your pg_xlog on a seperate disc..or at least a partition? This will help too. A checkpoints_segments of 20, if