Skip to main content

COST_STATUS in EXPLAIN

  • July 17, 2018
  • 1 reply
  • 3 views

ligia

When I run "EXPLAIN JSON", one of the things I get back is "COST_STATUS". I have looked in the documentation but can't find what it means, does anyone know anything about this?

1 reply

Ben_Vandiver
Forum|alt.badge.img
  • Participating Frequently
  • July 17, 2018

COST_STATUS explains whether the cost is based on good statistics or not. Other than "GOOD", it can be NO_STATISTICS (self evident) or PREDICATE VALUE OUT-OF-RANGE (estimated predicate selectivity due to stale statistics). The value not being GOOD doesn't necessarily mean the plan is bad, merely that it was based on (more) guesswork by the optimizer.