Discussion:
log_min_cost_statement
(too old to reply)
Nichlas Löfdahl
2004-04-13 15:26:01 UTC
Permalink
Hello!

Would it be possible to have an option "log_min_cost_statement", similar to
"log_min_duration_statement" except that it logs all statement that has
an minimum cost estimated by the planner? I think it would be easier to
find unoptimized queries that way.

Just a thought!

/Nichlas

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Tom Lane
2004-04-13 18:45:57 UTC
Permalink
Post by Nichlas Löfdahl
Would it be possible to have an option "log_min_cost_statement", similar to
"log_min_duration_statement" except that it logs all statement that has
an minimum cost estimated by the planner? I think it would be easier to
find unoptimized queries that way.
Why would you want to filter on the planner's cost estimate rather than
the true runtime?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Bruce Momjian
2004-04-13 18:26:15 UTC
Permalink
Post by Nichlas Löfdahl
Hello!
Would it be possible to have an option "log_min_cost_statement", similar to
"log_min_duration_statement" except that it logs all statement that has
an minimum cost estimated by the planner? I think it would be easier to
find unoptimized queries that way.
Uh, yea, I guess we could, but the costs are more comparison with other
costs, not really with other queries, I think, so I am not sure it would
be meaningful.
--
Bruce Momjian | http://candle.pha.pa.us
***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Peter Eisentraut
2004-04-13 18:46:05 UTC
Permalink
Post by Nichlas Löfdahl
Would it be possible to have an option "log_min_cost_statement",
similar to "log_min_duration_statement" except that it logs all
statement that has an minimum cost estimated by the planner? I think
it would be easier to find unoptimized queries that way.
If you believe that the costs have any absolute meaning at all then they
should be proportional to the execution time, so the existing setting
should be enough.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly

Loading...