Re: [SQL] plpgsql: return results of a dynamic query

2003-01-29 Thread Moritz Lennert
>> >> I'm trying to retrieve a row count from several tables (40) and would > like >> to create a function that does this automatically for the 40 and > displays >> the results. So, I loop through the tables: >> >> DECLARE >> obj RECORD; >> BEGIN >> FOR obj IN SELECT relname AS name FROM pg_cla

[SQL] plpgsql: return results of a dynamic query

2003-01-29 Thread Moritz Lennert
Hello, I'am a complete newbie to plpgsql, so if this information is explained somewhere where I haven't looked, yet, please point me to the doc... (I didn't find the answer in the PostgreSQL Programmer's Guide.) I use PG 7.3.1. I'm trying to retrieve a row count from several tables (40) and woul

[SQL] performance question

2003-01-21 Thread Moritz Lennert
Hello, I have a table with some 2.2 million rows on a Pentium4, 1.8GHz with 512 MB RAM. Some queries I launch take quite a long time, and I'm wondering whether this is normal,or whether I can get better performance somehow. As an example, I have a field which is in char(2), with 23 different poss

Re: [SQL] performance question

2003-01-20 Thread Moritz Lennert
> Moritz, > > There is a performance mailing list at: > > [EMAIL PROTECTED] > > --Josh I'm sorry, I didn't realize this, it is certainly closer to what I need. Next time I'll look better (google brought up references to this list, so I subscribed here). Thanks for the hint, Moritz

Re: [SQL] performance question

2003-01-20 Thread Moritz Lennert
> On Mon, 20 Jan 2003 16:42:12 +0100 (CET), "Moritz Lennert" > <[EMAIL PROTECTED]> wrote: >>explain analyze select commune_residence, type_diplome from rec81 where >>type_diplome = '11'; >>NOTICE: QUERY PLAN: >> >>Seq Scan on rec81 (c

Re: [SQL] performance question

2003-01-20 Thread Moritz Lennert
> On Mon, 20 Jan 2003 12:40:34 +0100 (CET), "Moritz Lennert" > <[EMAIL PROTECTED]> wrote: >>I have a table with some 2.2 million rows on a Pentium4, 1.8GHz with 512 MB RAM. >>Some queries I launch take quite a long time, and I'm wondering whether thi

[SQL] performance question

2003-01-20 Thread Moritz Lennert
Hello, I have a table with some 2.2 million rows on a Pentium4, 1.8GHz with 512 MB RAM. Some queries I launch take quite a long time, and I'm wondering whether this is normal,or whether I can get better performance somehow. As an example, I have a field which is in char(2), with 23 different poss