隨筆 - 79  文章 - 11  trackbacks - 0
          <2009年4月>
          2930311234
          567891011
          12131415161718
          19202122232425
          262728293012
          3456789

          不再墮落。
          Oracle documents: 
          http://tahiti.oracle.com/

          常用鏈接

          留言簿

          隨筆分類(66)

          隨筆檔案(79)

          相冊

          收藏夾(11)

          搜索

          •  

          積分與排名

          • 積分 - 53885
          • 排名 - 945

          最新隨筆

          最新評論

          閱讀排行榜

          Calculating the average row length for rows in a table is done when you analyze the table (using dbms_stats, or automatically in Oracle 10g), but there are times when you need an ad-hoc way to calculate the average row length within an Oracle table, especially when doing capacity planning.

          using dbms_lob.getlength(BLOB_COLUMN) to get an accurate average_row_length for rows with a BLOB column..

          select
          3 + avg(nvl(dbms_lob.getlength(CASE_DATA),0)+1 +
                         nvl(vsize(CASE_NUMBER   ),
          0)+1 +
                         nvl(vsize(CASE_DATA_NAME),
          0)+1 +
                         nvl(vsize(LASTMOD_TIME_T),
          0)+1
                        ) "Total bytes per row"
          from 
             arch_case_data
          where 
             case_number 
          = 301;
          注:“3”:Row Header。 
                 ad hoc query 即席查詢、突發查詢
                 ad hoc 即興、隨時出現.

          Row header

          For non cluster tables, the row header is 3 bytes. Each stored row has one row header. One byte is used to store flags, one byte to indicate if the row is locked (for example because it's updated but not commited), and one byte for the column count.

          ref: http://www.dba-oracle.com/t_average_row_length.htm
                http://www.adp-gmbh.ch/ora/concepts/db_block.html
          posted on 2009-04-24 11:39 donnie 閱讀(298) 評論(0)  編輯  收藏 所屬分類: database
          主站蜘蛛池模板: 宜川县| 玉屏| 库车县| 安庆市| 齐齐哈尔市| 婺源县| 彝良县| 汽车| 肇州县| 岱山县| 九寨沟县| 永寿县| 财经| 洛浦县| 稷山县| 和平区| 搜索| 岳普湖县| 乡宁县| 诸暨市| 宜兰县| 阜平县| 榆林市| 乐陵市| 黑山县| 裕民县| 化州市| 陵川县| 达孜县| 顺昌县| 白水县| 阿城市| 通海县| 新巴尔虎右旗| 二手房| 杨浦区| 望江县| 神农架林区| 天祝| 屏东市| 葫芦岛市|