Return-Path: postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id IAA19200 for postgres-dist; Tue, 16 Nov 1993 08:54:41 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199311161654.IAA19200@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from eng.ie.cuhk.hk (eng.ie.cuhk.hk [137.189.98.200]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id IAA19191; Tue, 16 Nov 1993 08:54:37 -0800
From: shlam@ie.cuhk.hk
Received: by eng.ie.cuhk.hk (5.57/Ultrix3.0-C)
	id AA12856; Wed, 17 Nov 93 00:56:00 +0800
Message-Id: <9311161656.AA12856@eng.ie.cuhk.hk>
To: aoki@postgres.Berkeley.EDU (Paul M. Aoki)
Cc: postgres@postgres.Berkeley.EDU, shlam@ie.cuhk.hk
Subject: Re: We need > 1 minute to make a query 
In-Reply-To: Your message of "Tue, 16 Nov 93 07:38:52 PST."
             <199311161538.HAA18730@nobozo.CS.Berkeley.EDU> 
Date: Wed, 17 Nov 93 00:55:59 +0800
Resent-To: postgres-dist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Tue, 16 Nov 93 08:54:41 -0800
Resent-XMts: smtp


Thank you very much for your advice. I think you had
pointed out the problem -- we didn't define the index well. Actually
before I received your reply mail, I discussed it with my colleagues and
we added another index definition for PATIENT table. Then we discovered
that the query time was dramatically reduced from 1 minute 19 seconds to 
4 seconds!
^^^^^^^^^^

Anyways, I will forward your mail to my colleagues and discuss with him to 
tune up our database.


>shlam@ie.cuhk.hk writes:
>> need  one minute and nineteen seconds. I wonder why the Postgres DBMS
>> takes so long to 
>>       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> process this query.

>like all databases, if the optimizer makes the wrong choice, it
>goes *really* slowly.  (as opposed to just plain slowly.  postgres
>is a prototype and was not written for performance.)

>out of curiosity, before complaining, did you try the same query/schema 
>on another system? 

I was not compaining about the performance of Postgres DBMS. I always 
thought that we may do something wrong in our table, index definitions, query
or we didn't install the Postgres correctly. We will still continue stick
on Postgres to develop our project.

Thanks :)

Alan S. H. Lam
Department of Information Engineering, CUHK, Hong Kong
E-mail: shlam@ie.cuhk.hk 
Tel: (852) 609 8364 Fax: (852) 603 5032
