Space utilization and optimal row size in Data Blocks in Oracle 11g

Hi,
My main concern till now is to find the Optimal no. of rows/tuples per one oracle data block of size 8192. For that purpose i'm doing different kind of testing.
I created one table:
SQL> create table t5
2 (x char(2000));
Table created.
Inserted 4 rows in it.
Queried to check in which block no's these 4 rows exist.
SQL> SELECT x,DBMS_ROWID.ROWID_BLOCK_NUMBER(rowid) "Block No."
2 from t5;
x Block No.
A 422
B 422
C 422
D 423
SQL> analyze table t5 compute statistics;
Table analyzed.
SQL> select LOGGING,BACKED_UP,NUM_ROWS,BLOCKS,EMPTY_BLOCKS, AVG_SPACE,CHAIN_CNT, AVG_ROW_LEN
2 from user_tables
3 where table_name = 'T5';
LOG B NUM_ROWS BLOCKS EMPTY_BLOCKS AVG_SPACE CHAIN_CNT AVG_ROW_LEN . YES N 4 5 3 6466 0 2006 .
8 data blocks are initially allocated. but my question is that while creating table of even small sizes, every time i'm seeing that it shows BLOCKS (used) are 5.
why 3 block are EMPTY_BLOCKS allocated all the time?
AVG_SPACE is the FREE space in every BLOCK that is used if i'm not wrong?
In this scenerio 3 rows (each of around 2006 bytes) are inserted into into one BLOCK of 8192 i.e. 8192-6006=2186. 2186 is the PCTFREE or what?
How can I see this CHAIN_CNT column value other than 0?
How can actually I find the optimal no. of rows/tuples in 1 data block that will not increase OVERHEAD on the system.
I'll highly appreciate the genuine help and solid suggestions.
Thanks in Advance.
Best Regards,
Kam

kamy555 wrote:
If you want to suggest something it'll be nice of yo.I can't disclose my main concern :)If you can't disclose what you mean by "optimal" and you can't disclose what "overhead" you are concerned about, I'm not sure that anyone could answer your question.
In this scenerio 3 rows (each of around 2006 bytes) are inserted into into one BLOCK of 8192 i.e. 8192-6006=2186. 2186 is the PCTFREE or
what?PCTFREE is a percentage. You haven't specified what you set it to, but that decreases the space in a block available for inserts to 8192 * (1 - PCTFREE/100).
How can I see this CHAIN_CNT column value other than 0?Why do you believe there would be chained rows? You would need to use the ANALYZE command to populate the CHAIN_CNT column.
How can actually I find the optimal no. of rows/tuples in 1 data block that will not increase OVERHEAD on the system.Since you can't disclose what "optimal" means or what "overhead" you're concerned with, I don't see how this question could be answered.
Justin

Similar Messages

  • Inserting rows into a data block

    Hi, how do i insert 'n' rows into a data block and after that commit the changes into the data base.
    Thanks for any help.

    You can use something like this:
    Go_Block('my_block');
    first_record;
    LOOP
    .... insert values to the items
    next_record;
    END LOOP;
    - for commiting changes
    Do_Key('Commit_Form');
    I hope this will help you.
    Helena

  • Is it possible to perform network data encryption between Oracle 11g databases without the advance security option?

    Is it possible to perform network data encryption between Oracle 11g databases without the advance security option?
    We are not licensed for the Oracle Advanced Security Option and I have been tasked to use Oracle Network Data Encryption in order to encryption network traffic between Oracle instances that reside on remote servers. From what I have read and my prior understanding this is not possible without ASO. Can someone confirm or disprove my research, thanks.

    Hi, Srini Chavali-Oracle
    As for http://www.oracle.com/technetwork/database/options/advanced-security/advanced-security-ds-12c-1898873.pdf?ssSourceSiteId… ASO is mentioned as TDE and Redacting Sensitive Data to Display. Network encryption is excluded.
    As for Network Encryption - Oracle FAQ (of course this is not Oracle official) "Since June 2013, Net Encryption is now licensed with Oracle Enterprise Edition and doesn't require Oracle Advanced Security Option." Could you clarify this? Thanks.

  • Why there is a huge difference between a row size on a disk based table and a row size in memoptimized table of SQL 2014?

    Hi All,
    I have two table with similar structure and data, one is on disk and the other is in memory. I somehow calculated the difference between a row size of on disk and in memory table and found that the row size of in memory is 700 Bytes more than the disk based
    tables.
    aa

    As others mentioned, memory optimized tables and disk based tables have different structures in SQL Server 2014.
    For memory optimized tables, the number of indexes on table also contribute to the size. You can calculate the exact size of rows and thus the table size using the formula given in the below articles
    Table and Row Size in Memory-Optimized Tables
    Estimate the Size of a Table
    Krishnakumar S

  • Table headings and column/row sizes

    I have mapped my FM table format to a table style defined in my CSS. However, I have the following issues with the resulting RoboHelp tables:
    I have a header row in the FrameMaker table, but the header doesn't come over into RH. All of the table rows are <td> instead of <th>. Therefore, the shading defined in my CSS for the table header row does not appear.
    A bunch of inline formatting that I don't want is coming over, defining the table width and the row width and height. Here's an example:
    <table class="formatA" cellspacing="0" width="600">
        <tr style="height: 18.00pt;">
            <td style="vertical-align: top; padding-left: 6.00pt; padding-top: 3.00pt;
                 padding-right: 6.00pt; padding-bottom: 3.00pt;" width="198"><p>Report/Visualization</p></td>
            <td style="vertical-align: top; padding-left: 6.00pt; padding-top: 3.00pt;
                 padding-right: 6.00pt; padding-bottom: 3.00pt;" width="402"><p>Description</p></td>
        </tr>
    Is there any way to get RH to recognize table header rows?
    Also, is there any way to prevent the size information from coming over? What I'd like is for the table width to be 100% and the cell widths and heights to be determined by their content (which would happen automatically if the inline formatting weren't added).
    If there isn't a way to accomplish this, then I'd probably be better off not trying to map the table styles and just going with "Source". The sizes would still be fixed, but at least the shading would appear.

    Forget FM for a moment. I think that if you create a table in RoboHelp using TH you will find  RoboHelp simply does not understand TH.
    The more people who report a bug or request a feature, the more likely it is to be actioned. Please follow this link.
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=38
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Single and  Multiple Records On Same Data Block?

    Hi all,
    Im using forms 6i with db 9i.
    Im having a nested table which contains a column of datatype TYPE(table of varchar2(100)).
    Now i want to create a data block based on the nested table.
    So, I want only one column should be multirecord in the block.
    When i set the block level NO OF RECORDS PROPERTY to multiple, then all the items in the block getting changed as
    multi records.
    Is that possible to have multirecord for a particular field OR how to fix this issue?
    Regards
    Sankar MN
    Edited by: SankarMCA on Oct 17, 2010 9:55 PM

    Hi Baiq,
    Thanks for your responses. I moved the multirecord item into a separate block(control block) and it worked.
    But still im having a doubt regarding this.
    How can we map a db column which has datatype of TYPE(Collection) to a particular item in forms?
    Because when i try to create a new datablock based on that table im not able to move that collection column from
    the available columns to database items in the datablock wizard. It seems like disabled and tree node structure and
    im not able to select the same.
    Next thing, Even though we assigned those column manually, How the commit_form save that multirecord column
    with multiple values?
    So kindly let me know how to solve this case if possible.
    Regards
    Sankar MN
    Edited by: SankarMCA on Oct 18, 2010 7:14 AM

  • How to generate TPC-E schema/data sets in Oracle 11g

    Hi,
    I want to use TPC-E schema in my Oracle 11g database (Standard) and also want to use DATA SETS from this benchmark for some kind of testing.
    I've download EGen v1.8.0 from this TPC website:
    http://www.tpc.org/tpce/default.asp
    but don't know who to implement this benchmark database into my computer's database. I'll appreciate if someone please suggest me how to do this...
    Thanks alot.
    Best Regards,
    Kamran

    kamran safdar malik wrote:
    I want to find Optimal size of a data block size as this is the one parameter which can increase the performance of a database or decrease it.If there is a single optimal size, that would surely be the default Oracle block size - as Oracle should know perhaps better than any of us, just what block size differences do as it is their code that uses it?
    Can I ask why you said that you would not have chosen this topic as a thesis?My leaning has always been to expert systems and A.I. Even designed and written my own expert system language years ago. One thing that is critical in such systems is how you structure data - and that has a nice database angle to it. One that I believe can still be exploited for research purposes.
    Don't you think that it'll benefit DBA's or database developer after I reach a successful conclusion?To be honest, in the real world of database systems, the least of my concerns are data block sizes. For example, we're busy putting together a storage array that should have a maximum I/O pipe size of 40Gb. In comparison, we currently use dual 2Gb fibre channels on most of our servers for our I/O.
    Technology moves fast. And perhaps there is an ideal block size for the standard storage array and Oracle instance today - but that could invalidated by new technology next year. Would I want to spend time and effort studying and analysing and researching a very specific technical subject, that perhaps is not considered as of that critical importance by DBAs and perhaps can be outdated with new technology and techniques?
    I honestly do not want to put you off studying db block sizes. Perhaps there's still some critical issues to uncover in that respect. But personally.. there are many other subject areas in database technology that peak my interest a lot more. But then you have your personal preferences and likes and dislikes - and data blocks could be your muse. :-)

  • Table move after data deletion in oracle 11g

    Hi,
    Our previous system was in oracle 9i, And we used to archive our data in every 1 year which caused a huged number of DML operation our database. After that,we used to move our table and rebuild indexes to releases spaces. After Upgradation ,our presence system is running on oracle version 11.2.0.2. Now my question do we need to move table in 11g to release space?? Or it automatically done in 11.2.0.2???
    Thanks and Regards,

    Our previous system was in oracle 9i, And we used to archive our data in every 1 year which caused a huged number of DML operation our database. After that,we used to move our table and rebuild indexes to releases spaces. After Upgradation ,our presence system is running on oracle version 11.2.0.2. Now my question do we need to move table in 11g to release space?? Or it automatically done in 11.2.0.2???If you move that space will be released from those extents but you wont gain any space at OS level until unless you shrink datafile. Move command will do the job.
    did you see what is the free space in tablespace after moving objects?

  • Problem with Export User's data from database oracle 11g

    i want export all user data and Its tables from oracle 11g database, I am using the comand exp, pero export only the tables with data, i Have Some tables and Not Without export data These tables,
    can someone help me!

    problem with zero extent table
    exp is de-supported in 11g. Use expdp instead to export tables without any rows.
    Srini

  • Date problem in oracle 11g

    iam New to oracle 11g but familiar with SQL 2005
    i have a table Patient which has a column Date_Of_Birth has datatype Date
    and iam writing a query in which if Date_Of_Birth column has a value
    *01/01/1900* then i should be replaced by *' ' or balnk*
    otherwise show date value for that i have made use of
    case
    query
    select case(Date_Of_Birth)-------------this is my column
    when '01/01/1900'
    then ''
    ELSE TO_CHAR( Patient.Date_Of_Birth, 'DD/MM/YYYY')
    END Date_Of_Birth
    from Patient -------------my table
    but error is comming
    Error starting at line 1 in command:
    select case(Date_Of_Birth)
    when '01/01/1900'
    then ''
    ELSE TO_CHAR( Patient.Date_Of_Birth, 'DD/MM/YYYY')
    END Date_Of_Birth
    from Patient
    Error at Command Line:2 Column:5
    Error report:
    SQL Error: ORA-00932: inconsistent datatypes: expected DATE got CHAR
    00932. 00000 - "inconsistent datatypes: expected %s got %s"
    *Cause:   
    *Action:
    Edited by: user13066438 on Jan 24, 2011 9:38 PM

    Hi there
    you have date data type in Date_Of_Birth you have to use to_date function
    try this
    select case((Date_Of_Birth)when to_date('01/01/1900', 'DD/MM/YYYY')
    then ''
    ELSE TO_CHAR(Patient.Date_Of_Birth, 'DD/MM/YYYY')
    END Date_Of_Birth
    from table_name;regards
    Hitesh

  • Forms clause query data source data block in oracle forms

    Hello experts,
                  I am new in oracle forms.I am using oracle forms 11g with weblogic 10.3.5 at windows 7.Through googaling I know how to create a database block,forms clause data block and stored procedure based datablock in oracle forms.I want to know that as in case of  Database based datablock, could we commit form either on editing records or on insertion or deletion in data block.
    I tried this but got error frm 40501.If we can perform editing and creation in such type of datablock then please tell me how.
    Thank You,
    regards
    aaditya

    When I base my datablock on a query using the "From Clause" property of the block query data source in the oracle Forms 6i,
    I get the strange error
    "ORA-00928: missing SELECT keyword"
    The query I see in the Display Error in Help Menu is
    SELECT DAY_NUMBER,CONSULTANT_ID,EVENT_ID,EVENT_NUMBER,SESSION_NUMBER,HOURS_UNPAID,HOURS_PAID,PAPERWORK FROM (EVENT_ASSIGNED_CONSULTANT) WHERE (CONSULTANT_ID=:1)
    What should I do now?????? Please remove the brackets () from the table name.
    Instead of (EVENT_ASSIGNED_CONSULTANT) use
    EVENT_ASSIGNED_CONSULTANT

  • Failed to get Column's data type in Oracle 11g

    Hi,
    I made an ADO connection(Oracle provider) to Oracle 11g, and use ADO API: OpenSchema(adSchemaColumns) to fetch the columns' info. But I found I couldn't get the column's data type if it's type is timestamp or timestampwithtimezone in database. What I got is 'adIUnknown' whose number is 13.
    I test with another column whose data type is 'date', and everything is ok. I get the data type 'adDBTimeStamp'.
    This issue occurs on Oracle 10g, too.
    Can anyone offer some help? Thanks a lot!

    See
    http://www.oracle.com/technology/tech/windows/odpnet/index.html
    http://download.oracle.com/docs/cd/B28359_01/win.111/b28431/using.htm#CHDJJDAJ

  • Enforce date datatype in oracle 11g

    Can I restrict database so that application can not enter date data in certain format.
    E.g. If I want that date enter should be registered in [year to minute] 'MM-DD-YYYY' hh:mm' only format and not in [year to second format]'MM-DD-YYYY' hh:mm:ss' then how I can do it in Oracle 11g.
    Currently I am using oracle sql developer to create data model and then I want to generate DDL from that to generate database. Is there is any facility in Oracle SQL developer to enforce format specification.
    thanks!

    This is not really related to SQLDeveloper, so you may find better answers in another forum but I'll try to give you an idea anyway.
    Actually the DATE datatype has no format, you use a format when you convert it to a string or vice versa, but the DATE itself is just a DATE.
    You could probably create a trigger to truncate your data as you see fit, but IMHO your best option would be to remove the seconds from your output queries using something like
    TO_CHAR(YOUR_DATE_FIELD,'MM-DD-YYYY HH24:MI')you can also set this output format for SQLDeveloper in
    Tools -> Preferences -> Database -> NLSbut this will work only for SQLDeveloper, it's up to you to determine the best way of setting the output/input date format in your specific application.

  • Anyone inserted data directly from Oracle 11g to MySQL?

    Hi There,
    We work mainly on Oracle 11g. However, there is a requirement to now connect to an external MySQL database from our company's Oracle Database. Would be trying to do this for the first time. The process would be to download the data using PL/SQL from the ORacle 11g DB and then insert the data into the MySQL DB table. Had a few questions,
    1. Are there any known issues with connections between ORacle as source and MySQL as target. Anything that needs to be kept in mind?
    2. How do we send the data to MySQL, I mean in PL/SQL we can have the procedure create the insert statements. But can we directly fire the insert on MySQL ? If yes, any suggestions on what the commands would be?
    3.Any way to figure out if the insert was successful?
    4. We might also have to do other operations like update/delete etc.
    5. Any possible reference or sample code on this would also help.
    Thanks

    Well, the simplest and most direct approach would be to create a java function in the database to perform the operation and call it from pl/sql. I've done it before and there are examples out there and its a pretty straight-forward process.
    A quick example from [this website|http://w2.syronex.com/jmr/edu/db/oracle-and-java]
    import java.io.*;
    import java.sql.*;
    public class OraThin {
      public static void main(String[] args) {
        try {
          Connection con=null;
          Class.forName("oracle.jdbc.driver.OracleDriver");
          con=DriverManager.getConnection(
            "jdbc:oracle:thin:@machine_name:1521:database_name",
            "scott",
            "tiger");
          Statement s=con.createStatement();
          s.execute("
            INSERT INTO BOOKS VALUES
            'A Tale of Two Cities',
            'William Shakespeare',
            4567891231,
            '5-JAN-1962'
          s.close();
          con.close();
       } catch(Exception e){e.printStackTrace();}
    }Check out Oracle's Java tutorial at http://docs.oracle.com/javase/tutorial/jdbc/basics/storedprocedures.html for more in-depth information.
    If you're going to be doing this for more than a handful of tables under very controlled circumstances keeping it synchronized is going to be a mess, however.
    Edited by: Bill Haverberg on Jun 20, 2012 8:05 AM

  • How to install and configure spatial web services (sdows.ear) of Oracle 11g R1 (Version 11.1.0.6.0) on Web Logic Server  (Version 10.3.3.0)?

    I need to deploy location based service (Directory Service and Route Service). My database is in Oracle 11gR1 (Version 11.1.0.6.0). The application is deployed on Weblogic Server (Version 10.3.3.0).
    When I try to deploy the sdows.ear file, I get the error regarding class (oracle.spatial.ws.logger) definition not found.
    The examples \ tutorials that I have found are either for deployment of sdows.ear on OC4J Application Server or they correspond to Oracle 11gR2 database based sdows.ear deployment on Weblogic
    Server. As I am new in this field and inexperienced developer, I am unable to understand the causes of such error.
    May I humbly request for the solution at the earliest.
    Thanking you in anticipation.
    regards,
    GVJ

    Hi,-
    Sorry about the late reply.
    We have patches for 11.2.0.3 and 12.1.0.1 database versions.
    Please let me know if they will work for you.
    Thanks

Maybe you are looking for

  • Wi-fi no hardware installed 10.9

    Hi, I have a macbook pro 15" (late 2008) 2,4ghz core 2 duo, 2gb ram. I update for the new OSX Mavericks 10.9 and i loose the wi-fi. When i click in the airport icon appears "wi-fi: No hardware installed" I already clean the PRAM, SMC and run the repa

  • How to catch return in BAPI_EQUI_CHANGE

    hello all, i am updating equipment details using BAPI_EQUI_CHANGE.    CALL FUNCTION 'BAPI_EQUI_CHANGE'      EXPORTING        EQUIPMENT               = wa_itab-equnr        DATA_GENERAL            = it_data_general        DATA_GENERALX           = it_

  • New Server for 1:1 Deployment?

    Could anyone give me some advice on what the best course of action is??? I have a Snow Leopard Server along with a collection of 100+ Bootcamped MBP using Snow Leopard & Win 7. We looking at deploying over 300+ iPad's but I know that at least 1 piece

  • WRT54GC forget user&pwd

    I've been using WRT54GC wireless router for a several years. Recently I got to make some wireless settings changes, but unforturnately I forgot the username and pwd to login the router. Is there solution to get back in or reset it so I can login by d

  • I have downloaded an audio talk from Audio Audible, and have authorised my computer to for my Audible Account, yet I still can't get the computer to play the download.

    I have downloaded an audio talk from Audio Audible, and have authorised my computer to for my Audible Account, yet I still can't get the computer to play the download.