records_per_block: can be set when the table has a lot of data?

Hello

We have a partition table with a length of middle line of 7K, and there are a lot of the line string. The score is based on the date, old partition will be truncated and reused later. I'm trying to find a way to limit the rows by block 1 (pct_free is another way, but is not reliable), it looks like records_per_block is a parameter that could be defined at the table level. But unfortunately, my test shows that the use of records_per_block, the table must be an empty table and insert a row inside and then set records_per_block, otherwise records_per_block will be ignored. Is there a solution?
SQL> create table t_11 as select rownum a, rpad('x',100,'x') b from dual connect by rownum<100;
 
Table created
SQL> delete t_11 where a<65;
 
64 rows deleted
SQL> select dbms_rowid.rowid_block_number(rowid),count(*) from t_11 group by dbms_rowid.rowid_block_number(rowid);
 
DBMS_ROWID.ROWID_BLOCK_NUMBER(   COUNT(*)
------------------------------ ----------
                        121354          2
                        121355         33
SQL> alter table t_11 minimize records_per_block;
 
Table altered
SQL> select dbms_rowid.rowid_block_number(rowid),count(*) from t_11 group by dbms_rowid.rowid_block_number(rowid);
 
DBMS_ROWID.ROWID_BLOCK_NUMBER(   COUNT(*)
------------------------------ ----------
                        121354          2
                        121355         33
SQL> insert into t_11 select * from t_11 where rownum<100;
 
35 rows inserted
SQL> select dbms_rowid.rowid_block_number(rowid),count(*) from t_11 group by dbms_rowid.rowid_block_number(rowid);
 
DBMS_ROWID.ROWID_BLOCK_NUMBER(   COUNT(*)
------------------------------ ----------
                        121354         37
                        121355         33
 

A solution that is not quite perfect - alter table XXX pctfree, pctused 99 1.
Unless your beginning of lines off incredibly short it will probably limit you to one line per block for the future DML.

As a guideline for "ranks shortcuts" (and this may vary slightly depending on whether you use SAMS or not):

SQL> insert into t1 values(rpad('x',42));

1 row created.

SQL> insert into t1 values(rpad('x',1));

1 row created.

SQL> select rowid from t1;

ROWID
------------------
AAAY2bAAFAAAA4KAAA
AAAY2bAAFAAAA4LAAA

Your analysis of the rows_per_block is not quite right — but the critical point is correct, it is very difficult to get the recorded "records per block" reduced once you have data in place. Here is an improved version of your test cut-n-pasted from a SQL * Plus term in 10.2.0.3:

SQL> @temp
SQL> set echo on
SQL>
SQL> drop table t_11;

Table dropped.

SQL>
SQL> create table t_11 as select rownum a, rpad('x',100,'x') b from dual connect by rownum<100;

Table created.

SQL>
SQL> select dbms_rowid.rowid_block_number(rowid),count(*) from t_11 group by dbms_rowid.rowid_block_number(rowid);

DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)   COUNT(*)
------------------------------------ ----------
                                5642         66
                                5643         33

2 rows selected.

SQL>
SQL> delete t_11 where a between 31 and 70;

40 rows deleted.

SQL>
SQL> select dbms_rowid.rowid_block_number(rowid),count(*) from t_11 group by dbms_rowid.rowid_block_number(rowid);

DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)   COUNT(*)
------------------------------------ ----------
                                5642         30
                                5643         29

2 rows selected.

SQL>
SQL> alter table t_11 minimize records_per_block;

Table altered.

SQL>
SQL> select dbms_rowid.rowid_block_number(rowid),count(*) from t_11 group by dbms_rowid.rowid_block_number (rowid);

DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)   COUNT(*)
------------------------------------ ----------
                                5642         30
                                5643         29

2 rows selected.

SQL>
SQL> insert into t_11 select * from t_11 where rownum<100;

59 rows created.

SQL>
SQL> select dbms_rowid.rowid_block_number(rowid),count(*) from t_11 group by dbms_rowid.rowid_block_number(rowid);

DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID)   COUNT(*)
------------------------------------ ----------
                                5644         33
                                5642         33
                                5643         33
                                5645         19

4 rows selected.

SQL> spool off

I delete the last lines 36 to one block and the first 4 lines on the other. For this reason, Oracle is capable (on the block drain plug) to reduce the size of the + 'line directory' + in the first block by removing the pointers 'empty' to the end of the book - but it cannot eliminate all entries in the directory of the line of the second block because the "empty" pointers are not at the end of the directory.

Code to determine the limit on the number of lines per block looks like the size of the largest directory online - not the current number of rows in the block.

In my example, the largest directory of line is 33 because the last 34 entries have been pruned at the end; in your example, the largest directory of line was still 67 because your deletion had left two rows at the end of the directory.

Concerning
Jonathan Lewis
http://jonathanlewis.WordPress.com
http://www.jlcomp.demon.co.UK

"Science is more than a body of knowledge; It's a way of thinking. "
Carl Sagan

Tags: Database

Similar Questions

  • addInstance does not work when the table has no rows

    I am trying to add a line to an empty table (no line) and it seems that addInstance does not work.

    table. Row. instanceManager.addInstance (1);

    Is there a different syntex if the table has no line?

    Thank you

    Try to use the shortcut to underscore for the instance Manager, it allows you to get items that do not yet exist.

    Then

    table.row.instanceManager.addInstance (1);

    becomes

    table._Row.addInstance (1);

  • How can I detect when the last container in my stream is full?

    I have a bunch of related containers which I am flowing text through. How can I detect when the text has filled a container? There's an overflowPolicy then I guess it can be detected.

    Hello

    I used this:

    private function IsOverset(textFlow:TextFlow):Boolean

    {

    var zeComposer:IFlowComposer = textFlow.flowComposer;

    var iTextLen:int = textFlow.textLength;

    var iNoController:int = zeComposer.findControllerIndexAtPosition (iTextLen - 1);

    return (iNoController is-1);

    }

    HTH,

    J.

  • How can I choose the image that will appear as 'image of departure', the one that is displayed when the video has not yet been clicked.

    Hello, I would like to know How to Choose the video image which will be appear in the form " ", "boot image", that image that appears when the video has no was clicked yetThe image all can see before viewing the video.
    Thank you, Pedro Paulo

    You can change the image poster of clips in the icon view. By default, the first image of a clip appears in the thumbnail viewer and in other places in the Bill where the thumbnail is displayed. You can override the default thumbnail by designating any clip image as a poster frame.

    To set a poster frame for the icon, drag the playback slider or shuttle to the desired image and press the keys command + P (Mac OS) or SHIFT + p (Windows).

  • An email received, how can I configure my email to receive a notification when the recipient has read the email?

    How can I configure my email to receive a notification when the recipient has read the email?

    Based on your e-mail program, a read receipt can be ignored by the recipient and some servers will block any reception

    Basically there is no process by which a receipt can be confirmed or that the recipient has read the mail - except by asking them directly

  • How triggers can be created in the table?

    Hi all
    How triggers can be created in the table?
    is 12 or as far as we can?

    There is no technical limit to the number of triggers you set (or, at least, not one that any rational person has never touched). He usually would not make sense to have more than one trigger of a given type on a particular table, even if you can come up with situations where you can have multiple triggers of the same type on a single table.

    Normally, when people ask this question, it is because someone (foolishly) he asked in an interview. Frequently, the interviewer is trying to determine if you know how many types of triggers there is no if you know if there are some esoteric limit on the number of triggers.

    Justin

  • How to ensure that the value of a control (for example double) initializes the last value when the VI has been closed?

    I use a cluster as a control. I would like to double in this control to automoatically values to fill their last values set when the VI is opened or accessed for the first time. It would be great if someone could point out for me. Thanks in advance!

    In my opinion, the configuration files are the easiest method and the best.  Simply save your last values to the file when your code ends.  At the beginning of your code, to read the file and fill in the controls with the values read.  With the configuration files, the section name can be the name of the cluster, and key names can be control names.

    I know OpenG has some pretty nice to do, but I prefer to use the native functions OR when I can.  When porting to a new system, there is no need to copy any additional screws library (OpenG library).  The native DV come with Labview.

  • In ADF when the list has changed

    Need help please...

    In ADF when the list has changed I want choose value in the attribute according to changes in the list.

    I would write a ValueChangeListener for the SelectOneChoice. There you can get the selected value and the appropriate value to the 'value' attribute

    It might look like this:

    {} public void valueChangeListener (ValueChangeEvent vcEvent)

    Get the selected value of SelectOneChoice

    String newValue = (String) vcEvent.getNewValue ();

    get the value of the attribute "value" depending on the value selected in SelectOneChoice and set

    ...

    }

  • Satellite A50-109 shut down when the CPU has to work hard

    My laptop off when I open the www with graphic flash or when the processor has to work hard. What's wrong?

    Hello

    Looks a bit like an overheating problem. What do you think??
    Have you checked the temperature with a tool of freeware as an Everest for example?

    To my knowledge the laptop stops automatically if the temperature rises to a critical level to prevent material damage!

    I think that the cooling modules don t runs properly and therefore the temperature doesn't fall.

    Usually, fans can turn with a maximum yield due to dust and debris inside the laptop.
    From time to time it s advisable to clean the fans with a spray of air compression. It can be everywhere for laptop and computer purchase.

    You should also be able to clear any dust and debris using a normal vacuum.
    Place it on the grids of aspiration air for a few seconds. But be careful.
    A strong suction can damage fans.

    If you have no experience, I recommend to contact a technician and would like to ask for help

    Good luck

  • I can't download attachments in Windows Live, although I can view online when the link is there and can also download zip.

    Cannot download attachments in windows live, although can view online when the link is there and can also download zip. What has happened recently. I was always able to do until recently.

    original title: Windows Live Mail

    Hello

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums at www.windowslivehelp.com.

  • which method is called when the screen has lost focus but stays on blackberry?

    Hello

    I want to know in which method is called when the screen has lost focus, but always visible BlackBerry?

    For example, a screen is in the foreground and we disply dialog box so that the screen is visible but not to focus, therefore, at this time that methos called when we close this dialog box?

    Please, help me please please

    Override the following methods in your class to screen according to your needs

    1. when the screen button to the stack

    Call

    onDisplay() or

    onUiEngineAttached(boolean attached) - so attached is true then your screen is at the top of the screen

    2. When you are in a backlight and the lcd screen turns off to your state of rest and turns on again when you actively use this form

    call

    onVisibilityChange(boolean visible) - if visible is set to true, then you get the focus when the lcd display turns

    3. when your application moves to the background by clicking the red end button (i.e. without quiting the app, yet yours is active in the background)

    call

    onExposed() - when your application comes to the foreground of the background or during any type of screen that is in the top get popped

    & call

    onObscured() - when your application moves to the background, or when a screen pushed above your current screen more

  • When the Surface has a direct purchase for HBO Go app?

    When the Surface has a direct purchase for HBO Go app?

    Original title: HBO Go

    Hello Susan,

    Thanks for posting your question on the forum of the Microsoft community.

    Unfortunately, HBO Go app is not included as an application that can be purchased directly for Windows Surface and we have all the information when it is included in the Windows store.

    Please let us know if you have any other questions.

    Thank you

  • Created a form of contact, but when the customer has received potential customer demand, check boxes change to a true or false, there a way to change Yes or no?

    Created a form of contact, but when the customer has received potential customer demand, check boxes change to a true or false, there a way to change Yes or no?

    This is the system default, you can customize either she or you try using forms of third party:

    http://musewidgets.com/collections/all/products/forms-bundle

    Thank you

    Sanjit

  • I can't set up the kindle

    I can't set up the kindle

    You cannot configure your Kindle using Adobe software. In fact, your Kindle (what version) comes almost installation, you must enter your Amazon store information to go. Amazon has its own area to support the Kindle. If you have an Adobe application specific, that you want to download on your Kindle that is through the Kindle store. If you need assistance with a specific application of Adobe, then go on the forum of the application appropriate for the Android software.

  • Can I turn off the table of contents?

    I'm using RH 8, Windows 7 and generate WebHelp

    I have a fusion project. I have 4 children rpojects and 1 parent. Can I turn off the table of contents on the parent and see only on the projects of the child?

    I already unchecked the options in all windows when I generate and which did not help.

    Thank you.

    Pat

    My answer and ' Ricks give you alternative means.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

Maybe you are looking for

  • Slow connection wired Internet in Bootcamp?

    So I've implemented (undeer 10.11.5) a bootcamp partition on my Mac Pro 5.1 on the first disc (Bay 1). Installed win7/64. Got all of the updates from m$ and installed components of bootcamp. Everything works well, even went and got a benchmarking app

  • Home page header is always last year Christmas scene... How can I change it please?

    I have a header of Christmas on Firefox since last year and I want to change... How can I do it please?

  • Satellite A50: early warning on screen

    When I start my laptop Satellite A50, running on xp, win, home, 512 RAM I get a promt the screen saying warning: POINT OF INTELLIGENT BRIDGE NOT FOUND ALERTS.THE FILE NAME OF THE IMAGE OF PROCEDURE ENTRY POINT GET PROCESS W, COULD NOT BE LOCATED IN T

  • No download memory card reader

    My computer is a HP Pavilion HPE-210F model. I use Windows 7 Home 64-bit version. The computer cannot read my Xd picture card when it is inserted. When I go to the Manager of system properties/devices and scroll down for disk drives, listed are 4 car

  • Upgrade RAM T430 at 16 / 32GB

    Hello I want to improve my laptop t430 to 16/32 GB of RAM. When I bought this laptop, Lenovo store told me that this laptop only has a single open RAM slot and he added 8 GB of RAM and was told that we cannot improve this portable 16/32 GB of RAM. Bu