Re: [SQL] what is "cost"?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: holston(at)itd(dot)nrl(dot)navy(dot)mil (Gregory Holston)
Cc: pgsql-sql(at)hub(dot)org
Subject: Re: [SQL] what is "cost"?
Date: 1999-04-23 21:29:24
Message-ID: 199904232129.RAA14632@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Bitmead 1999-04-24 02:58:53 Re: [SQL] Large objects - bug? caveat? feature?
Previous Message Gregory Holston 1999-04-23 21:27:37 Re: [SQL] what is "cost"?