Re: [PERFORM] Creating and updating table using function parameter reference

2008-02-15 Thread Linux Guru
-performance questions to pgsql-general. A Dijous 14 Febrer 2008 13:35, Linux Guru va escriure: I still cannot pass tablename, what is wrong? Is this the right way? CREATE OR REPLACE FUNCTION test ( t1 text,t2 text ) RETURNS numeric AS $$ declare temp1 text; declare temp2 text; declare

Re: [PERFORM] Creating and updating table using function parameter reference

2008-02-14 Thread Linux Guru
: A Dimecres 13 Febrer 2008 15:25, Linux Guru va escriure: I want to create and update two tables in a function such as below, but using parameters as tablename is not allowed and gives an error. Is there any way I could achieve this? You're looking for EXECUTE: http://www.postgresql.org/docs/8.3

Re: [PERFORM] Update with Subquery Performance

2008-02-13 Thread Linux Guru
yes, I also thought of this method and tested it before I got your mail and this solution seems workable. Thanks for the help On Feb 12, 2008 9:18 PM, Tom Lane [EMAIL PROTECTED] wrote: Linux Guru [EMAIL PROTECTED] writes: Analyzing did not help, here is the out of EXPLAIN ANALYZE of update

[PERFORM] Creating and updating table using function parameter reference

2008-02-13 Thread Linux Guru
I want to create and update two tables in a function such as below, but using parameters as tablename is not allowed and gives an error. Is there any way I could achieve this? CREATE OR REPLACE FUNCTION test ( t1 text,t2 text ) RETURNS numeric AS $$ declare temp1 text; declare temp2 text; begin

Re: [PERFORM] Update with Subquery Performance

2008-02-12 Thread Linux Guru
=19) (actual time=0.049..17.834 rows=2414 loops=22712) Filter: ((product)::text = ($0)::text) Total runtime: 578968.885 ms Thanks On Feb 12, 2008 2:29 AM, Scott Marlowe [EMAIL PROTECTED] wrote: On Feb 11, 2008 5:06 AM, Linux Guru [EMAIL PROTECTED] wrote: We have a large

Re: [PERFORM] Update with Subquery Performance

2008-02-12 Thread Linux Guru
loops=22712) - Seq Scan on dummy temp (cost=0.00..2416.01 rows=586 width=19) (actual time=0.049..17.834 rows=2414 loops=22712) Filter: ((product)::text = ($0)::text) Total runtime: 578968.885 ms On Feb 11, 2008 9:59 PM, Tom Lane [EMAIL PROTECTED] wrote: Linux Guru

[PERFORM] Update with Subquery Performance

2008-02-11 Thread Linux Guru
We have a large datawarehouse stored in postgres and temp tables are created based on user query. The process of temp table creation involves selecting data from main fact table, this includes several select and update statements and one of the following update statement is having performance

[PERFORM] Index ot being used

2005-06-10 Thread linux
Hi all, I have an index on a table that doesn't seem to want to be used. I'm hopig someone might be able to help point me in the right direction. My index is (typed, not copied): tle-bu= \d file_info_7_display_idx; Index public.file_info_7_display_idx Column | Type