| From: | Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Trigger function cost |
| Date: | 2009-04-09 16:45:23 |
| Message-ID: | 726087.12777.qm@web23605.mail.ird.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>
> > Is there any reason to mess with this?
>
> No. The planner doesn't actually bother to figure the
> cost of triggers
> anyway, since presumably every correct plan will fire the
> same set of
> triggers. So even if you had a more accurate cost estimate
> than that
> one, it wouldn't get used for anything.
>
Excellent, that's good with me.
> Now, for ordinary non-trigger functions, it might be worth
> paying
> some attention to the cost estimate. "1" is
> intended to denote the
> cost of a reasonably simple C function, so PL functions
> should pretty
> much always have costs that are large multiples of that.
> 100 is a
> reasonable default, but if you know better you can put
> something else.
>
Cool, I'll leave it alone for now then, interesting stuff, thanks Tom.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Aurimas Černius | 2009-04-09 16:54:43 | Re: complicated query (newbie..) |
| Previous Message | Sam Mason | 2009-04-09 16:40:10 | Re: ON condition in LEFT OUTER JOIN doesn't work?! |