Claims
- 1. A database management system for managing data in a database, comprising:
- 2. The database management system of claim 1, wherein the data is organized in tables formed from columns and rows and said statistic is automatically generated for a selected column.
- 3. The database management system of claim 1, wherein said query optimizer determines if said selected column is of a type for which a statistic can be generated and if so generates a statistic.
- 4. A database management system for managing data in a database, comprising:
- 5. A database management system for managing data in a database, comprising:
- 6. A database management system for managing data in a database, comprising:
- 7. The database management system of claim 6, wherein said threshold value is a constant.
- 8. The database management system of claim 6, wherein said threshold value is a function of the data.
- 9. The database management system of claim 5, wherein the data is organized in tables formed from columns and rows and said statistic is generated for a selected column.
- 10. A computer having stored in memory computer-executable instructions for operating a query optimizer for selecting an executable procedure from a plurality of procedures that operate on data in a database, wherein said query optimizer automatically generates a statistic derived from data that is operated upon by one of a plurality of procedures;
generates a statistic update counter for said statistic; selects the executable procedure from the plurality of procedures based on said statistic; increments said statistic update counter when said statistic is updated; and automatically removes said statistic if said statistic update counter breaches a threshold.
- 11. A database management system for managing data in a database, comprising:
computer-readable instructions for generating a plurality of procedures that operate on data in a database; computer-readable instructions for automatically generating a statistic derived from the data that is operated upon by one of the plurality of procedures; and computer-readable instructions for selecting an executable procedure from the plurality of procedures based on said statistic.
- 12. A database management system for managing data in a database, comprising:
computer-readable instructions for generating a plurality of procedures that operate on data in a database; computer-readable instructions for automatically generating a statistic derived from the data that is operated upon by one of the plurality of procedures; computer-readable instructions for generating a statistic update counter for said statistic; computer-readable instructions for selecting the executable procedure from the plurality of procedures based on said statistic; computer-readable instructions for incrementing said statistic update counter when said statistic is updated; and computer-readable instructions for automatically removing said statistic if said statistic update counter breaches a threshold.
- 13. A method for selecting an executable procedure from a plurality of procedures that operate on data in a database, comprising the steps of:
a) automatically generating a statistic derived from data that is operated upon by one of the plurality of procedures; and b) selecting the executable procedure from the plurality of procedures based on said statistic.
- 14. A method for selecting an executable procedure from a plurality of procedures that operate on data in a database, comprising the steps of:
a) determining that a statistic does not exist for data operated upon by at least one of a plurality of procedures; b) generating said statistics; c) selecting one of said plurality of procedures using said statistic.
- 15. A computer-readable media having stored thereon computer-executable instructions for performing the steps recited in claim 14.
- 16. A method for avoiding the accumulation of statistics in a database wherein statistics are automatically generated, comprising the following steps:
a) creating a statistics update counter for an automatically created statistic; b) incrementing said counter when said statistic is updated; and c) removing said automatically created statistic when said counter breaches a threshold value.
- 17. A computer-readable media having stored thereon computer-executable instructions for performing the steps recited in claim 16.
- 18. A method for automatically generating statistics for data in a database, comprising the following steps:
a) determining if automatic creation of statistics has been authorized in the database; b) if automatic creation of statistics has not been authorized in the database, forming a guess as to the statistics; c) if automatic creation of statistics has been authorized in the database, determining if the data is of a type for which statistics can be generated in the database; d) if the data is of a type for which statistics can be generated in the database, generating the statistics; and e) if the data is of a type for which statistics can not be generated in the database, forming a guess as to the statistics.
- 19. A computer-readable media having stored thereon computer-executable instructions for performing the steps recited in claim 18.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application is related by subject matter to the inventions disclosed in commonly assigned U.S. patent application Ser. No. (not yet assigned) (Atty. Docket No. Msft-0019), filed on even date herewith, entitled “Automatic Database Statistics Maintenance and Plan Regeneration.”
Continuations (1)
|
Number |
Date |
Country |
Parent |
09213087 |
Dec 1998 |
US |
Child |
10034806 |
Dec 2001 |
US |