The cost is useful for figuring out why the optimizer chose (e.g.) a full table scan over an index. A lower cost query can run faster than a higher cost one! Thus the cost is (usually) higher.Īll other things being equal, a query with a higher cost will use more resources and thus take longer to run. Cardinality is the estimated number of rows the step will return.Ĭost is the estimated amount of work the plan will do.Ī higher cardinality => you're going to fetch more rows => you're going to do more work => the query will take longer.
0 Comments
Leave a Reply. |