|
> From: BirgittaHauser
>
> >>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.
>
> Statistic information are collected for all SQL tables, physical files and
> access path (keyed logical files and SQL indexes). In this way statistics
> can help for ad hoc queries in the same way as they do for queries that
> already have been executed.
But if the field is not part of an access path and you haven't done a query
over it, are the statistics already in place? That would imply that
statistics are collected on every write or update to the database, which is
not something I'd like.
Can you turn collection on for individual columns within a database?
> Certainly not 10% of disk space. The space to store the statistics depends
> on the number of access paths built over the physical files/tables and the
> number of different key values. For each access path the different key
> values and the number of rows that satisfy this values are stored, which
> is much less space than an index or keyed logical file takes.
Actually, if the keys are unique, then this sounds like it would take nearly
exactly the same amount of storage as an index. Instead of the unique key
and the RRN of the record, you would have the key and the number of
occurrences, which would always be one.
Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.