Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id DE43F475B50 for ; Thu, 18 Jul 2002 10:08:36 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g6IE8UAl005126; Thu, 18 Jul 2002 10:08:30 -0400 (EDT) To: jhood@hmcon.com (Jeffrey Hood) Cc: pgsql-general@postgresql.org Subject: Re: Query Performance... In-reply-to: References: Comments: In-reply-to jhood@hmcon.com (Jeffrey Hood) message dated "17 Jul 2002 13:31:29 -0700" Date: Thu, 18 Jul 2002 10:08:29 -0400 Message-ID: <5125.1027001309@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200207/1117 X-Sequence-Number: 27604 jhood@hmcon.com (Jeffrey Hood) writes: > We have recently converted from MS SQLServer 7 to Postgres 7.1... The > following query runs perfectly fine in SQL Server with any where > clause attached, but in Postgres runs fine until you put a where > clause that has *no* criteria for Patients... then it runs forever... Define "runs forever". AFAICT this query is going to give 750K rows of output, if there's no WHERE clause. How long do you expect that to take? How long does it actually take? Is SQL Server really any faster given the same query with no WHERE? regards, tom lane