Easy way to estimate a table size in the future
2005-11-30 15:13
369 查看
Easy way to estimate a table size in the future |
The CD also includes a set of stored procedures you can use to calculate estimated space requirements when the table and indexes have already been built. The main procedure is called sp_EstTableSize, and it requires only two parameters: the table name and the anticipated number of rows. The procedure calculates the storage requirements for the table and all indexes by extracting information from the sysindexes, syscolumns, and systypes tables. The result is only an estimate when you have variable-length fields. The procedure has no way of knowing whether a variable-length field will be completely filled, half full, or mostly empty in every row, so it assumes that variable-length columns will be filled to the maximum size. If you know that this won't be the case with your data, you can create a second table that more closely matches the expected data. For example, if you have a varchar(1000) field that you must set to the maximum because a few rare entries might need it but 99 percent of your rows will use only about 100 bytes, you can create a second table with a varchar(100) field and run sp_EstTableSize on that table. |
相关文章推荐
- Whats the best way to split an array in ruby into multiple smaller arrays of random size
- The easy way to execute sudo command in Python using subprocess.Popen
- The best way to configure the student course table in Hibernate
- Fastest way to estimate rows in a table
- Is there any best way to reduce the size of ibdata in mysql.?
- The Easy Way To Get Recent Comments In WordPress
- ADF: The best way to indicate for records in a table the existence of details
- Modify in the AVL report,and refresh to the internal table
- This application has request the Runtime to terminate it in an unusual way.
- how to get the space size of some tables in one database?
- EJB3: Mapping of 1-to-1 relationships when primary key in the source table is also a foreign key for the target entity
- http://ai-depot.com/articles/the-easy-way-to-extract-useful-text-from-arbitrary-html/
- [ERROR] InnoDB: Trying to access page number 7 in space 957, space name XXX which is outside the tablespace bounds
- This application has requested the Runtime to terminate it in an unusual way
- (Reporting Made Easy)The New ReportViewer Control in Visual Studio 2005 Provides Rich Capabilities to Fulfill All Your Reporting Needs
- The Best Way to Use a 32-Bit DLL Library in a 64-Bit Platform
- The best way to deal with large files in Python style
- Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
- Easy way to install the bluetooth(BCM2045A)