[SQL] Memory and performance

2001-04-04 Thread edipoelder
Hi all, I have noted that Postgresql don't make a good memory handle. I have made the tables/procedure (in attached file) and run it as "select bench(10, 5000)". This will give a 5 records inserts (5 x 1). (well, I run it on a P200+64MB of RAM, under Linux, and Postgres 7.0.2. In

Re: Fwd: [SQL] Calling functions inside a function: behavior

2001-04-02 Thread edipoelder
Em 02 Apr 2001, Josh Berkus escreveu: >BEGIN WORK; >COMMIT WORK; In time... I think that could be great if postgresql implement a commit inside functions. Abracos, Edipo Elder [[EMAIL PROTECTED]] _ Oi! Você quer u

[SQL] Help with 'now', now(), timestamp 'now', ...

2001-03-30 Thread edipoelder
Hi all, I´m developing some procedures in my db and i want know how much time my procedures take to execute. So, i write my first procedure (to test) as follows: CREATE FUNCTION TEST(INTEGER) RETURNS INTEGER AS ' DECLARE SEQ RECORD; BEGIN SELECT N

[SQL] Function with now() | time 'now' | etc...

2001-03-28 Thread edipoelder
Hi all, I wrote the folling function: DROP FUNCTION PROC_TESTE(INTEGER); CREATE FUNCTION PROC_TESTE(INTEGER) RETURNS INTEGER AS ' DECLARE SEQ RECORD; BEGIN SELECT NEXTVAL(''TEMPOS_ID_SEQ'') AS ID INTO SEQ; INSERT INTO TEMPOS (ID, INICIO) VALUES (SEQ.ID, NOW())