|
On average, a column stat takes up approximately 8K - 12K per column.
> From: BirgittaHauser
>
> >>What happens if you stop and start collection of SQL Statistics?
>
> Statistics are used by the SQE optimizer to determine the optimal index.
> The statistics contain information about how much rows in a table meet the
> available key values in an index.
> For example if you want to select all order from a specified client and
> around 80% of all orders are from this client, the optimizer will favor a
> table scan instead of using an index. If an other client will be selected
> an index can be used.
> (...snip...)
> BTW the CQE optimizer can only use estimates. For example for an =
> specified
> in a where condition 10% of the rows in a table are expected/estimated.
And it is this collection of statistics that makes SQL so powerful. Without
it, a good programmer with knowledge of his database can still use ISAM
techniques to provide better performance than SQL because he will in effect
be able to make the decisions that the CQE cannot.
As statistics get better, SQL matches and then surpasses the low-level
programmer because its information is always correct while the programmer is
relying on his/her knowledge of the system, which may be out of date.
Similarly, though, if you stop the collection of statistics, the SQL
statistics will become stale and it will begin to make poorer decisions.
And of course, statistics don't help as much in completely ad hoc
situations, because the SQL engine will have no statistics on queries that
have never been done. But in general, SQL queries will just get better and
better.
One thing I do worry about is exactly how much space is taken up to store
the information required to make the queries faster. I'd love to see the
statistics on what percentage of disk space is required to store the
statistics for a file. If it's something on the order of a tenth of a
percent, it's not a big deal. If it's 10% or more, it's a big deal!
Joe
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.