pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: raja kumar thatte <trajakumar@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: give me suggestion pl.
Date: Sun, 19 Aug 2001 21:26:20 -0700 (PDT)
Message-ID: <20010820042620.18826.qmail@web3904.mail.yahoo.com> (raw)
In-Reply-To: <25409.998233758@sss.pgh.pa.us>

Hai  all, 
I have created two tables as follows

CREATE TABLE AAA(
     ORG CHAR(4),
     TERM CHAR(4),
     ID CHAR(4),
     NAME VARCHAR(15) NOT NULL,
     DTTIME TIMESTAMP DEFAULT NOW(),
...
........
.
.
.
44 fields
     CONSTRAINT AAA PRIMARY KEY (ORG,TERM,ID),
     CONSTRAINT AAA_NAME_UNIQ UNIQUE (ORG,NAME),
     CONSTRAINT AAA_FK_OEID FOREIGN KEY(ORG)
REFERENCES BBBB(ID) on delete cascade,
     CONSTRAINT AAA_FK_TEID FOREIGN KEY(TERM)
REFERENCES BBBB(ID) on delete cascade);
                                           



CREATE TABLE KKKK (
     ORG CHAR(4),
     TERM CHAR(4),
     ID CHAR(4),
     DTTIME TIMESTAMP DEFAULT NOW(),
...
...
...
40 fields

     CONSTRAINT KKKK_FK FOREIGN KEY(ORG,TERM,ID)
REFERENCES AAA(ORG,TERM,ID) on delete cascade,
     CONSTRAINT KKKK_PK PRIMARY KEY
(ORG,TERM,ID,DTTIME));
                                                      
                                              

The table AAA will be having 2000 records.
Every 15 minutes each record will be updated. The
trigger on AAA will add the new record in KKK whenever
there is an update operation. 
So at the end of a week there will be around 5 laks
records in KKKK.

My problems is 
'select * from KKKK' is taking a long time (more than
5 minutes ) even if KKKK is having 3 records or 5 laks
records. 

How can i improve the performance of this select
operation.


Thanks 
raja

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Message-ID: <20010820042620.18826.qmail@web3904.mail.yahoo.com>
Permalink:  ../20010820042620.18826.qmail@web3904.mail.yahoo.com/
Also on:    postgresql.org/message-id/20010820042620.18826.qmail@web3904.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: trajakumar@yahoo.com
  Subject: Re: give me suggestion pl.
  In-Reply-To: <20010820042620.18826.qmail@web3904.mail.yahoo.com>
  References: <25409.998233758@sss.pgh.pa.us> <20010820042620.18826.qmail@web3904.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox