1) Get an estimate of the number of records for the table, both now, and
projected to 6 months from now
2) Find the average length of each record. If you cannot do this
perfectly, then try to make a good guess.
3) Determine how often the table is updated/inserted/deleted. If it is
changed often (and the record sizes vary), then the PCTUSED would be
low, something like 40-60. If the table is static, then I'd make the
table PCTUSED 85 or 90.
4) Determine my database's block size:
select value from v$parameter where name = 'db_block_size';
Now I have all of the information needed to size my table:
Records per block = (block size - 110 bytes for overhead) * (PCTUSED/100)/
Average Record Size
Total blocks = (records in table) / (records per block)
Total table size = blocks * block size
Give a little fudge factor and make this your INITIAL extent size.
Your NEXT will be determined by your 6 month growth projection.Thursday, August 25, 2011
Table Sizing Information
Friday, August 12, 2011
Oracle Query to produce UNIX cal command like calendar
break on month skip 1 set linesize 20 column month 20 select lpad( Month, 20-(20-length(month))/2 ) month, "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" from ( select to_char(dt,'fmMonthfm YYYY') month, to_char(dt+1,'iw') week, max(decode(to_char(dt,'d'),'1',lpad(to_char(dt,'fmdd'),2))) "Su", max(decode(to_char(dt,'d'),'2',lpad(to_char(dt,'fmdd'),2))) "Mo", max(decode(to_char(dt,'d'),'3',lpad(to_char(dt,'fmdd'),2))) "Tu", max(decode(to_char(dt,'d'),'4',lpad(to_char(dt,'fmdd'),2))) "We", max(decode(to_char(dt,'d'),'5',lpad(to_char(dt,'fmdd'),2))) "Th", max(decode(to_char(dt,'d'),'6',lpad(to_char(dt,'fmdd'),2))) "Fr", max(decode(to_char(dt,'d'),'7',lpad(to_char(dt,'fmdd'),2))) "Sa" from ( select trunc(sysdate,'y')-1+rownum dt from all_objects where rownum <= add_months(trunc(sysdate,'y'),12) - trunc(sysdate,'y') ) group by to_char(dt,'fmMonthfm YYYY'), to_char( dt+1, 'iw' ) ) order by to_date( month, 'Month YYYY' ), to_number(week)
Subscribe to:
Posts (Atom)