[GENERAL] summary aggregate information from a second table

2004-02-17 Thread Matthew Lunnon
Hi,   I have two tables and I want to get summary information from the second table for each row of the first table, I can see two ways to do this one is with the SQL below but since the first table is very big the group by takes a long time and there is no need since it is unique.  The seco

Re: [GENERAL] Huge Data

2004-01-14 Thread Matthew Lunnon
Have you run 'vacuum analyze log;'? Also I believe that in Oracle count(1) used to be quicker than count(*). Matthew - Original Message - From: Sezai YILMAZ To: Richard Huxton Cc: [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 12:39 PM Subject: Re: [GENERA

Re: [GENERAL] Pg_dumpall problem

2003-11-20 Thread Matthew Lunnon
  - Original Message - From: Patrick Hatcher To: [EMAIL PROTECTED] Sent: Thursday, November 20, 2003 12:34 AM Subject: [GENERAL] Pg_dumpall problem Did a pg_dumpall from my production database (7.3.2) and I tried to restoreto my Dev database (7.4).  I

Re: [GENERAL] Optimizing query

2003-11-19 Thread Matthew Lunnon
Do something like:   CREATE OR REPLACE FUNCTION my_date_part( timestamp) RETURNS DOUBLE precision AS 'DECLARE mydate ALIAS FOR $1;BEGIN return date_part( ''day'', mydate );END;' LANGUAGE 'plpgsql' IMMUTABLE; create index idx_tmp on stat_views( my_date_part( created ) ); or add an extra date_p