Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA95000 for ; Thu, 13 May 1999 01:24:01 -0400 (EDT) (envelope-from maillist@candle.pha.pa.us) Received: (from maillist@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id BAA29263; Thu, 13 May 1999 01:22:29 -0400 (EDT) From: Bruce Momjian Message-Id: <199905130522.BAA29263@candle.pha.pa.us> Subject: Re: [SQL] JOIN index/sequential select problem In-Reply-To: from "gjerde@icebox.org" at "May 12, 1999 11:47:32 pm" To: gjerde@icebox.org Date: Thu, 13 May 1999 01:22:29 -0400 (EDT) CC: Tom Lane , pgsql-sql@postgreSQL.org X-Mailer: ELM [version 2.4ME+ PL56 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > On Wed, 12 May 1999, Tom Lane wrote: > > gjerde@icebox.org writes: > > > Then postgres is not guessing right. Even tho the table only has > > > ~200 rows, the query still takes forever to finish. I have let it go for > > > a few minutes, and it still wasn't done.. > > Something wrong there; even with a nested loop, it shouldn't take more > > than a few seconds to process that query. Please dig into it a little > > more (do you have gprof?) and find where it's spending the time. > > Yes, it definately takes too long. I just let it run its course with > profiling on, and it took a good 25 minutes. > > Compiling postgres with -pg created 2 gmon.out files. One in postgres > home dir(/home/postgres/) and one in the database > directory(/home/postgres/data/base/parts). The first one had very little > in it, while the second one is the one below, which seemed to be the right > stuff. > > gprof says: > % cumulative self self total > time seconds seconds calls us/call us/call name > 100.00 0.01 0.01 3 3333.33 3333.33 ValidatePgVersion Yikes. ValidatePGVersion. Seems you are in a loop in there somehow. I bet you have a terrible mismatch somewhere. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026