[PERFORM] temporary table vs array performance

2016-09-26 Thread dby...@163.com
test: create type h3 as (id int,name char(10)); CREATE or replace FUNCTION proc17() RETURNS SETOF h3 AS $$ DECLARE v_rec h3; BEGIN create temp table abc(id int,name varchar) on commit drop; insert into abc select 1,'lw'; insert into abc select 2,'lw2'; for v_rec in select * from abc loop

Re: [PERFORM] Temporary table retains old contents on update eventually causing slow temp file usage.

2006-07-18 Thread Rusty Conover
On Jul 18, 2006, at 6:22 AM, Gavin Sherry wrote: On Tue, 18 Jul 2006, Rusty Conover wrote: Hi, It would seem that doing any changes on a temp table forces a copy of the entire contents of the table to be retained in memory/disk. Is this happening due to MVCC? Is there a way to change this

Re: [PERFORM] Temporary table retains old contents on update eventually

2006-07-18 Thread Gavin Sherry
On Tue, 18 Jul 2006, Rusty Conover wrote: > Hi, > > It would seem that doing any changes on a temp table forces a copy of > the entire contents of the table to be retained in memory/disk. Is > this happening due to MVCC? Is there a way to change this behavior? > It could be very useful when you

[PERFORM] Temporary table retains old contents on update eventually causing slow temp file usage.

2006-07-18 Thread Rusty Conover
Hi, It would seem that doing any changes on a temp table forces a copy of the entire contents of the table to be retained in memory/disk. Is this happening due to MVCC? Is there a way to change this behavior? It could be very useful when you have really huge temp tables that need to be

Re: [PERFORM] Temporary table retains old contents on update eventually causing slow temp file usage.

2006-07-18 Thread Rusty Conover
Sorry for replying to my own post. I forgot to include my version information, I used: PostgreSQL 8.1.0 on powerpc-apple-darwin8.3.0, compiled by GCC powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026) and PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gc

RES: [PERFORM] Temporary table

2006-06-23 Thread Franklin Haut
Ok, it works. Thanks Franklin -Mensagem original- De: Larry Rosenman [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 23 de junho de 2006 19:08 Para: 'Franklin Haut'; pgsql-performance@postgresql.org Assunto: RE: [PERFORM] Temporary table Franklin Haut wrote: > He

Re: [PERFORM] Temporary table

2006-06-23 Thread Larry Rosenman
Franklin Haut wrote: > Hello, > > I´m have some problems with a temporary table, i need create a table, > insert some values, make a select and at end of transaction the table > must droped, but after i created a table there not more exist, is > this normal ? > > How to reproduce : > > >

Re: [PERFORM] Temporary table

2006-06-23 Thread Tom Lane
"Franklin Haut" <[EMAIL PROTECTED]> writes: > How to reproduce : > CREATE TEMP TABLE cademp ( > codemp INTEGER, > codfil INTEGER, > nomemp varchar(50) > ) ON COMMIT DROP; > INSERT INTO cademp (codemp, codfil, nomemp) values (1,1,'TESTE'); >

[PERFORM] Temporary table

2006-06-23 Thread Franklin Haut
Hello, I´m have some problems with a temporary table, i need create a table, insert some values, make a select and at end of transaction the table must droped, but after i created a table there not more exist, is this normal ? How to reproduce : CREATE TEMP TABLE cademp (

Re: [PERFORM] Temporary Table

2005-11-07 Thread Andrew McMillan
On Tue, 2005-11-08 at 10:22 +, Christian Paul B. Cosinas wrote: > I see. > > But How Can I put this in the Cron of my Linux Server? > I really don't have an idea :) > What I want to do is to loop around all the databases in my server and > execute the vacuum of these 3 tables in each tables.

Re: [PERFORM] Temporary Table

2005-11-07 Thread Jeff Frost
mance@postgresql.org Subject: Re: [PERFORM] Temporary Table Christian Paul B. Cosinas wrote: I try to run this command in my linux server. VACUUM FULL pg_class; VACUUM FULL pg_attribute; VACUUM FULL pg_depend; But it give me the following error: -bash: VACUUM: command not found That needs

Re: [PERFORM] Temporary Table

2005-11-07 Thread Christopher Kings-Lynne
hristian Paul B. Cosinas Cc: 'Alvaro Nunes Melo'; pgsql-performance@postgresql.org Subject: Re: [PERFORM] Temporary Table Christian Paul B. Cosinas wrote: I try to run this command in my linux server. VACUUM FULL pg_class; VACUUM FULL pg_attribute; VACUUM FULL pg_depend; But it gi

Re: [PERFORM] Temporary Table

2005-11-07 Thread Christian Paul B. Cosinas
Sent: Tuesday, November 08, 2005 2:11 AM To: Christian Paul B. Cosinas Cc: 'Alvaro Nunes Melo'; pgsql-performance@postgresql.org Subject: Re: [PERFORM] Temporary Table Christian Paul B. Cosinas wrote: > I try to run this command in my linux server. > VACUUM FULL pg_class; >

Re: [PERFORM] Temporary Table

2005-11-07 Thread Christopher Kings-Lynne
In what directory in my linux server will I find these 3 tables? Directory? They're tables in your database... ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [PERFORM] Temporary Table

2005-11-07 Thread Christopher Kings-Lynne
Ummm...they're SQL commands. Run them in PostgreSQL, not on the unix command line... Christian Paul B. Cosinas wrote: I try to run this command in my linux server. VACUUM FULL pg_class; VACUUM FULL pg_attribute; VACUUM FULL pg_depend; But it give me the following error: -bash: VACUUM:

Re: [PERFORM] Temporary Table

2005-11-07 Thread Joshua D. Drake
Christian Paul B. Cosinas wrote: I try to run this command in my linux server. VACUUM FULL pg_class; VACUUM FULL pg_attribute; VACUUM FULL pg_depend; But it give me the following error: -bash: VACUUM: command not found That needs to be run from psql ... I choose Polesoft Lockspa

Re: [PERFORM] Temporary Table

2005-11-07 Thread Christian Paul B. Cosinas
I try to run this command in my linux server. VACUUM FULL pg_class; VACUUM FULL pg_attribute; VACUUM FULL pg_depend; But it give me the following error: -bash: VACUUM: command not found I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html ---

Re: [PERFORM] Temporary Table

2005-11-07 Thread Christian Paul B. Cosinas
In what directory in my linux server will I find these 3 tables? -Original Message- From: Alvaro Nunes Melo [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 26, 2005 10:49 AM To: Christian Paul B. Cosinas Subject: Re: [PERFORM] Temporary Table Christian Paul B. Cosinas wrote: >I

Re: [PERFORM] Temporary Table

2005-11-07 Thread Ralph Mason
Alvaro Herrera wrote: Christian Paul B. Cosinas wrote: Does Creating Temporary table in a function and NOT dropping them affects the performance of the database? The system will drop it automatically, so it shouldn't affect. What _could_ be affecting you if you execute that function a

Re: [PERFORM] Temporary Table

2005-11-07 Thread Alvaro Herrera
Christian Paul B. Cosinas wrote: > Does Creating Temporary table in a function and NOT dropping them affects > the performance of the database? The system will drop it automatically, so it shouldn't affect. What _could_ be affecting you if you execute that function a lot, is accumulated bloat in

[PERFORM] Temporary Table

2005-11-06 Thread Christian Paul B. Cosinas
Does Creating Temporary table in a function and NOT dropping them affects the performance of the database?   I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html

Re: [PERFORM] Temporary Table

2005-10-25 Thread Christian Paul B. Cosinas
? -Original Message- From: Alvaro Nunes Melo [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 25, 2005 10:58 AM To: Christian Paul B. Cosinas Subject: Re: [PERFORM] Temporary Table Hi Christian, Christian Paul B. Cosinas wrote: > Does Creating Temporary table in a function and NOT dropp

[PERFORM] Temporary Table

2005-10-25 Thread Christian Paul B. Cosinas
Does Creating Temporary table in a function and NOT dropping them affects the performance of the database?   I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html