预测Oracle表增长 [英] Predicting Oracle Table Growth

查看:151
本文介绍了预测Oracle表增长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何预测Oracle表的未来大小/增长?

How can I predict the future size / growth of an Oracle table?

假设:


  • 行数的线性增长

  • 基本数据类型(字符,数字和日期)的已知列


    • 忽略varchar2的可变性

    • 基本了解存储它们所需的空间(例如 number

    • linear growth of the number of rows
    • known columns of basic datatypes (char, number, and date)
      • ignore the variability of varchar2
      • basic understanding of the space required to store them (e.g. number)

      我在寻找比现在测量,等待,再次测量更主动的东西。

      I'm looking for something more proactive than "measure now, wait, measure again."

      推荐答案


      1. 根据您的数据类型估算平均行大小。

      2. 估计块中的可用空间。这将是块大小,减去块头大小,减去剩余的PCTFREE空间。例如,如果你的块头大小是100字节,你的PCTFREE是10,你的块大小是8192字节,那么给定块中的空闲空间是(8192 - 100)* 0.9 = 7282

      3. 估计该空间中将有多少行。如果您的平均行大小为1 kB,则大约7行将适合8 kB的块。

      4. 估计您的增长率,以每行为单位。例如,如果您预计每年会有100万行,那么每8 kB块中每行7行,您的表格将每年增长大约1 GB。

      1. Estimate the average row size based on your data types.
      2. Estimate the available space in a block. This will be the block size, minus the block header size, minus the space left over by PCTFREE. For example, if your block header size is 100 bytes, your PCTFREE is 10, and your block size is 8192 bytes, then the free space in a given block is (8192 - 100) * 0.9 = 7282.
      3. Estimate how many rows will fit in that space. If your average row size is 1 kB, then roughly 7 rows will fit in an 8 kB block.
      4. Estimate your rate of growth, in rows per time unit. For example, if you anticipate a million rows per year, your table will grow by roughly 1 GB annually given 7 rows per 8 kB block.

      这篇关于预测Oracle表增长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆