[SQL] Very slow DELETE on 4000 rows of 55000 row table

2007-04-02 Thread Bryce Nesbitt
I've got a DELETE FROM that seems to run forever, pegging the CPU at 100%. I can't figure out why it's slow. Any clues? stage=# EXPLAIN DELETE FROM EG_INVOICE WHERE PERIOD_ID = 1017506; Index Scan using ix22f7bc70c7de2059 on eg_invoice (cost=0.00..105.39 rows=3955 width=6) Index Cond: (peri

Re: [SQL] Calling void functions

2007-04-02 Thread Daniel CAUNE
> PERFORM works only in plpgsql, Peter wrote a pl/sql-function... > Oups, sorry! I missed the point. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [HACKERS] timestamp subtraction (was Re: [SQL] formatting intervals with to_char)

2007-04-02 Thread Bruce Momjian
Added to TODO: o Have timestamp subtraction not call justify_hours()? http://archives.postgresql.org/pgsql-sql/2006-10/msg00059.php --- Jim C. Nasby wrote: > Yes, but if it was '2004-01-02 01:00:00'-'200

[SQL] Maxusers MaxConnections

2007-04-02 Thread ezequias
Hi list, I would like to know some performance issues about maxconnections or maxusers in postgresql.conf. My questions are: - Have someone an application with many connections (or users, I don't know the difference in postgresql) like 1,000 connections ? - How many memory each user spen

[SQL] SQL4. I ask you to help in development (or critic).

2007-04-02 Thread sql4-en.narod.ru
SQL4 is project of novation technology in DBMS. I ask you to help in development (or critic). SQL4 consist of DDL, DML and TML (Tree Manipulation Language). TML4 is new advanced query language, which processes trees and counts in database, put them into it, and get them from it (tree's model of d

Re: [SQL] Calling void functions

2007-04-02 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > I'm informed that the last statement of a function that returns void cannot > be > a SELECT. How else is one supposed to call another function which also > returns void? Hmm, seems like the best answer is to rejigger the order of the tests in chec

Re: [SQL] Update problem.

2007-04-02 Thread Andrew Sullivan
On Mon, Apr 02, 2007 at 04:52:46PM +0200, Shavonne Marietta Wijesinghe wrote: > At a surtain point i need to replace a record with another > > For example i have inserted 4 records. (1, 2 , 3 , 4) I need to > replace all the values from the record 4 to the record 2 but > keeping the n_gen serial

[SQL] Update problem.

2007-04-02 Thread Shavonne Marietta Wijesinghe
Hello I have a table created as the following CREATE TABLE mod48_00_2007 ( id text, n_gen serial NOT NULL, formstore text, te_cognome text, te_paternita text, te_nome text, te_sesso text, te_dtnasc text, te_attnasc text, te_luonasc text, te_provstato text, te_indi text,

[SQL] Update problem.

2007-04-02 Thread Shavonne Marietta Wijesinghe
Hello I have a table created as the following CREATE TABLE mod48_00_2007 ( id text, n_gen serial NOT NULL, formstore text, te_cognome text, te_paternita text, te_nome text, te_sesso text, te_dtnasc text, te_attnasc text, te_luonasc text, te_provstato text, te_indi text,

Re: [SQL] Calling void functions

2007-04-02 Thread A. Kretschmer
am Mon, dem 02.04.2007, um 8:52:09 -0400 mailte Daniel Caune folgendes: > > I'm informed that the last statement of a function that returns void > > cannot be > > a SELECT. How else is one supposed to call another function which > also > > returns void? > > > > PERFORM PERFORM works only in

Re: [SQL] Calling void functions

2007-04-02 Thread Daniel Caune
> I'm informed that the last statement of a function that returns void > cannot be > a SELECT. How else is one supposed to call another function which also > returns void? > PERFORM ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[SQL] Calling void functions

2007-04-02 Thread Peter Eisentraut
I'm informed that the last statement of a function that returns void cannot be a SELECT. How else is one supposed to call another function which also returns void? E.g., CREATE FUNCTION foo (a int, b int) RETURNS void LANGUAGE plpgsql AS $$ do important things $$; CREATE FUNCT