Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.databases > #252
| From | "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Difference in JDBC re |
| Message-ID | <gambjh$n3u$1@localhost.localdomain> (permalink) |
| Newsgroups | comp.lang.java.databases |
| References | <317dcb86-f935-45ca-afbc-15f8e63252b2@d77g2000hsb.googlegroups.com><cd5a8be |
| Date | 2011-04-27 15:22 +0000 |
| Organization | TDS.net |
To: comp.lang.java.databases On Mon, 15 Sep 2008 09:49:00 -0700, Tom Cole wrote: > > When deploying an application on a client's system, they want to know > (within bounds) how much disk space/resources they will need in the > future to support an application's database. The goal is to provide them > with a worst case scenario (i.e. maximum row size for all tables > affected) for each new record. Then they would do an analysis to > determine how many new rows they would expect in a week/month/year/ > decade, apply that to the formula and get at least some form of educated > guess how big these tables will be in the future. > That would indeed be a useful tool. Your best move may be to parse the schema (assuming there is one written in DDL) and combine that with a config file containing a list of overheads for the various objects (tables, indexes, etc) that can be included in the schema. This list needs to include any padding used to align column types on word boundaries, so its probably a nightmare to set up, but at least it only needs to be done once per DBMS. You can get most of what you need by using JDBC to read the meta-data, but work through the DatabaseMetaData class rather than fetching column names and examining them as you have been doing. This can get most of the stuff you need in terms index and table definitions, but still won't tell you about: - per-row overheads in tables and indexes - any padding used to align numeric columns on word boundaries - data representation overheads such as length words or null terminators In short, you'll still need the DBMS-specific config file I mentioned above. Of course, you could always just load a representative data set into the database, measure the space occupied and scale that to match the client's data volume, but that's probably to write as a shell script rather than in Java. -- martin@ | Martin Gregorie gregorie. | Essex, UK org | --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.databases | Previous | Next — Previous in thread | Find similar
Difference in JDBC result "Tom Cole" <tom.cole@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Difference in JDBC re "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Difference in JDBC re "Tom Cole" <tom.cole@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Difference in JDBC re "Silvio Bierman" <silvio.bierman@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Difference in JDBC re "Tom Cole" <tom.cole@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
Re: Difference in JDBC re "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
csiph-web