Received: from candle.pha.pa.us (maillist@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.9.3/8.9.1) with ESMTP id RAA35569 for ; Fri, 23 Apr 1999 17:29:43 -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 RAA14632; Fri, 23 Apr 1999 17:29:25 -0400 (EDT) From: Bruce Momjian Message-Id: <199904232129.RAA14632@candle.pha.pa.us> Subject: Re: [SQL] what is "cost"? In-Reply-To: from Gregory Holston at "Apr 23, 1999 5:27:37 pm" To: holston@itd.nrl.navy.mil (Gregory Holston) Date: Fri, 23 Apr 1999 17:29:24 -0400 (EDT) Cc: pgsql-sql@hub.org X-Mailer: ELM [version 2.4ME+ PL47 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > The cost value is only meaningful to the optimizer in comparing various > > query plans. > > > I got the 72.98 on this table while doing a simple "select * from > publication" meanwhile I got nothing higher than 4 on any other table. Is this > indicative of a problem? No. It means the optimizer thinks it is going to have to do more work to complete the query. All other methods it used to complete the query had a higher cost. It is related to the number of rows in the table, the indexes available, sorts needed, joins, etc. -- 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