pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
what is "cost"?
4+ messages / 2 participants
[nested] [flat]

* what is "cost"?
@ 1999-04-23 20:09 Gregory Holston <holston@itd.nrl.navy.mil>
  1999-04-23 21:24 ` Re: [SQL] what is "cost"? Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Gregory Holston @ 1999-04-23 20:09 UTC (permalink / raw)
  To: pgsql-sql@hub.org


Hi All,

I just did an explain and was wondering what is meant by cost.  I just 
got a 72.983 cost from a query I found not working.  Any info or pointers 
would be appreciated.

Thanks,

-Greg

Running:Apache/1.3.1 (Unix) PHP/3.0.3 Postgres 6.2



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] what is "cost"?
  1999-04-23 20:09 what is "cost"? Gregory Holston <holston@itd.nrl.navy.mil>
@ 1999-04-23 21:24 ` Bruce Momjian <maillist@candle.pha.pa.us>
  1999-04-23 21:27   ` Re: [SQL] what is "cost"? Gregory Holston <holston@itd.nrl.navy.mil>
  0 siblings, 1 reply; 4+ messages in thread

From: Bruce Momjian @ 1999-04-23 21:24 UTC (permalink / raw)
  To: holston@itd.nrl.navy.mil; +Cc: pgsql-sql@hub.org

> 
> Hi All,
> 
> I just did an explain and was wondering what is meant by cost.  I just 
> got a 72.983 cost from a query I found not working.  Any info or pointers 
> would be appreciated.

Just added to explain manual page:

	The cost value is only meaningful to the optimizer in comparing various
	query plans.

-- 
  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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] what is "cost"?
  1999-04-23 20:09 what is "cost"? Gregory Holston <holston@itd.nrl.navy.mil>
  1999-04-23 21:24 ` Re: [SQL] what is "cost"? Bruce Momjian <maillist@candle.pha.pa.us>
@ 1999-04-23 21:27   ` Gregory Holston <holston@itd.nrl.navy.mil>
  1999-04-23 21:29     ` Re: [SQL] what is "cost"? Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Gregory Holston @ 1999-04-23 21:27 UTC (permalink / raw)
  To: Bruce Momjian <maillist@candle.pha.pa.us>; +Cc: pgsql-sql@hub.org



On Fri, 23 Apr 1999, Bruce Momjian wrote:

> > 
> > Hi All,
> > 
> > I just did an explain and was wondering what is meant by cost.  I just 
> > got a 72.983 cost from a query I found not working.  Any info or pointers 
> > would be appreciated.
> 
> Just added to explain manual page:
> 
> 	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?

-Greg



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [SQL] what is "cost"?
  1999-04-23 20:09 what is "cost"? Gregory Holston <holston@itd.nrl.navy.mil>
  1999-04-23 21:24 ` Re: [SQL] what is "cost"? Bruce Momjian <maillist@candle.pha.pa.us>
  1999-04-23 21:27   ` Re: [SQL] what is "cost"? Gregory Holston <holston@itd.nrl.navy.mil>
@ 1999-04-23 21:29     ` Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Bruce Momjian @ 1999-04-23 21:29 UTC (permalink / raw)
  To: holston@itd.nrl.navy.mil; +Cc: pgsql-sql@hub.org

> > 	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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~1999-04-23 21:29 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-04-23 20:09 what is "cost"? Gregory Holston <holston@itd.nrl.navy.mil>
1999-04-23 21:24 ` Bruce Momjian <maillist@candle.pha.pa.us>
1999-04-23 21:27   ` Gregory Holston <holston@itd.nrl.navy.mil>
1999-04-23 21:29     ` Bruce Momjian <maillist@candle.pha.pa.us>

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