Rows per block

hi.
how do i know number of rows per blocks

One way is to use dbms_stats as howardjr suggested.
YAS@10GR2 > drop table t;
Table dropped.
YAS@10GR2 > create table t as select * from all_objects where rownum<=100;
Table created.
YAS@10GR2 > exec dbms_stats.gather_table_stats(ownname=>null,tabname=>'T');
PL/SQL procedure successfully completed.
YAS@10GR2 > select NUM_ROWS,BLOCKS,NUM_ROWS/BLOCKS from user_tables where table_name='T';
  NUM_ROWS     BLOCKS NUM_ROWS/BLOCKS
       100          5              20Another way is to use dbms_rowid to find out how many rows each block has.
YAS@10GR2 > select dbms_rowid.rowid_block_number(rowid) block,count(*)
  2  from t
  3  group by dbms_rowid.rowid_block_number(rowid);
     BLOCK   COUNT(*)
      1501          9
      1500         91

Similar Messages

  • Avg num of rows per blk

    HI Can any one please point to me a document or a way to calculate the average number of rows per block in oralce 10.2.0.3

    This is a little late but for anyone interested here are some results from Jonathan's query plus for comparison purposes I added a query to do the blocks/num_rows calculation and I added a compute avg on avg_rows even though this is not 'proper' way to calculate the average rows per block. The target table is 4.2G in size.
    Enter value for tbl_name: xxx_xxxxx
    TWENTIETH   MIN_ROWS   MAX_ROWS TOT_BLOCKS   TOT_ROWS AVG_ROWS
             1          1          2       9439      10133     1.07
             2          3          4        972       3426     3.52
             3          5          6       1449       8101     5.59
             4          7          8       2425      18349     7.57
             5          9         10       4194      40204     9.59
             6         11         12       9946     115661    11.63
             7         13         14      28703     390941    13.62
             8         15         16      70452    1100064    15.61
             9         17         17      47960     815320    17.00
            10         18         18      52212     939816    18.00
            11         19         19      85585    1626115    19.00
            12         20         20      70143    1402860    20.00
            13         21         21      29570     620970    21.00
            14         22         22      23561     518342    22.00
            15         23         23      28524     656052    23.00
            16         24         24      20786     498864    24.00
            17         25         25       2291      57275    25.00
            18         26         26       1679      43654    26.00
            19         27         27       1897      51219    27.00
            20         28         28        992      27776    28.00
    avg                                                       16.91
    sum                                  492780    8945142
    20 rows selected.
    AVG ROWS/BLK
              17

  • How to set number of rows in "Rows Per Page Selector" in Interactive Report

    Hi Guys,
    Is there any way to set the number of rows in "Rows Per Page Selector" in Interactive Report. By default it is set to 15.
    I know one way is to change the number of rows when you are running the report and then set that as 'Default Report Setting'.
    If anybody is aware of any other way, please let me know.
    Cheers,
    Ashish Agarwal
    http://www.dbcon.com.sg

    Hi Pavel,
    can you please specify your question more clearly. If you are on NW 7.0 you can determine a number of colums for your filter item with following command:
    COLUMNS
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/85/08e241aa8e9d39e10000000a155106/content.htm
    If you meant the amount of rows within the analysis item you can use following command within your analysis item:
    BLOCK_ROWS_SIZE   (numbers of rows displayed at once)
    BLOCK_ROWS_STEP_SIZE  (numbers of rows to be scrolled for one step)
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/76/489d39d342de00e10000000a11402f/content.htm
    Brgds,
    Marcel
    Edited by: Marcel Landsfried on Feb 10, 2009 7:45 PM
    Edited due to wrong url

  • How to set the number of rows per page dynamically

    Hello all,
    i urgent need the option to set the number of rows per page dynamically.
    I've got a parameter.
    In dependence of the value of this paramter i want to set the number of rows per page of a repeating frame.
    The Reports Builder version i use is 10.1.2.0.2
    I defined a report trigger.
    My code so far:
    function R_G_BEMERKUNGFormatTrigger return boolean is
    begin
    if :vYN_Display_one_per_page = 'Y' then
    --what i've to write right here??
    return (TRUE);
    else
         return (TRUE);
    end if;
    return (TRUE);
    end;
    Can anyone help me please??
    Best regards
    Florian

    Do you just need to change back and forth between 1 and some other number? If so, you can create two identical layouts, one with the "number of rows per page" preperty (on the repeating frame) set to 1 and the other layout set to whatever. You would have to have duplicate layouts for each group you wanted to do this with. Your format trigger on the outermost master group frame where num of rows was 1 would look like:
    function M_G_ename_GRPFRFormatTrigger return boolean is
    begin
      if :vYN_Display_one_per_page = 'Y'  then
        return (TRUE);
      else
        return (FALSE);
      end if;
    end;Your format trigger on the outermost master group frame where num of rows was whatever would look like:
    function M_G_ename_GRPFR1FormatTrigger return boolean is
    begin
      if :vYN_Display_one_per_page = 'N'  then
        return (TRUE);
      else
        return (FALSE);
      end if;
      return (TRUE);
    end;

  • How I show only 20 rows per pages in a rtf report in BI Publisher 11g

    I'm making a report and i want show only 20 rows per pages in a formatt RTF. I get this with anything as a xls, xslt....
    I'm a new user....please . Any idea..???
    Thank for all.
    Edited by: 844565 on Mar 15, 2011 7:34 AM

    Instead of doing that take the url CURRENT_SERVER_URL(pre-definde BI Publsiher variable) by declaring like below
    <?param@begin:CURRENT_SERVER_URL?>
    Then subsequently add the extra patameters eg. region like below
    {$CURRENT_SERVER_URL}Data/Country.xdo&p_region={REGION} <- get this REGION value from XML
    Cheers,
    ND
    Use the "helpful" or "correct" buttons to award points to replies.

  • Hacking application id equals() to allow more than one row per "primary key"

    I have a read only entity whose primary key is not the real primary key
    on the underlying table. The result is that I get more than one row per
    "primary key". This is what I want. However KODO will not allow me do
    it, because I am storing the collection in a HashSet() and the equals()
    method on the application id object ensures that this set contains no
    duplicates (as defined by the application id). At least thats how it
    seems to behave.
    So, I have hacked the equals() method to do this:
    public boolean equals (Object ob)
    if (this == ob)
    return true;
    // Doing this because we expect more than one row from
    // REF_CODES for the same domain/shortCode combination.
    // This is ok to do (I guess?) as long as we are only
    // doing selects using this class.
    return false;
    Will this hack have any side effects? Is there another option? Like
    using a list collection? Is so, which collections are supported?
    Thanks,
    Mike.

    The "primary key" I am using it already a compound key of two columns.
    The real key on the underlying table is a three column key. But the
    problem is that the table represents two different application level
    entities. I could deal with it when I was hand-writing SQL (I could do
    a distinct for example) but now I am relying on foreign key
    relationships since I moved to JDO. Not sure what to do. Best solution
    is to rework the table, but there is a lot of legacy code (that other
    teams use and maintain) relying on this table. I guess I'll use the
    weekend for inspiration ;-)
    Steve Kim wrote:
    This sounds like a dangerous operation. Even if this works now, I
    cannot promise future compatibility... and in fact may result in bad
    data (for example in caching both at the PM and PMF level) Is there no
    other field that you can reference as part of the primary key? Primary
    Keys can be multi columned (e.g. last_name, soc_sec_number)
    Mike Hogan wrote:
    I have a read only entity whose primary key is not the real primary
    key on the underlying table. The result is that I get more than one
    row per "primary key". This is what I want. However KODO will not
    allow me do it, because I am storing the collection in a HashSet() and
    the equals() method on the application id object ensures that this set
    contains no duplicates (as defined by the application id). At least
    thats how it seems to behave.
    So, I have hacked the equals() method to do this:
    public boolean equals (Object ob)
    if (this == ob)
    return true;
    // Doing this because we expect more than one row from
    // REF_CODES for the same domain/shortCode combination.
    // This is ok to do (I guess?) as long as we are only
    // doing selects using this class.
    return false;
    Will this hack have any side effects? Is there another option? Like
    using a list collection? Is so, which collections are supported?
    Thanks,
    Mike.

  • Writing large xmltype data to UTL_FILE and setting max row per file

    Hey Gurus,
    I am trying to create a procedure (in Oracle 9i) that writes out xml data I have created into several xml files (file would probably be to large for one xml file output...I am doing this for 270,000 rows of data), setting the max rows to 1000 rows per file. I know one would have to create a looping contsruct to do this but I am just not adept enough in PL/SQL to figure it out at the moment.
    So essentially their would be some sort of loop construct and substr process that creates a file after looping through 1000 rows and then continues the count and creates a another file until all 270 xml files are created. Simple enough right...lol? Well I've tried doing this and haven't gotten anywhere. My pl/sql coding skills are too elementary I am guessing. I've only been doing this for about three months and could use the assistance of a more experienced person here.
    Here are the particulars...
    This is the xmltype view code that I used to create the xml data.
    select XMLELEMENT("macess_exp_import_export_file",
    XMLELEMENT("file_header",
    XMLELEMENT("file_information")),
    XMLELEMENT("items",
    XMLELEMENT("documents",
    (SELECT XMLAGG(XMLELEMENT("document",
    XMLELEMENT("external_reference"),
    XMLELEMENT("processing_instructions",
    XMLELEMENT("update", name)),
    XMLELEMENT("filing_instructions",
    XMLELEMENT("folder_ids",
    XMLELEMENT("folder",
    XMLATTRIBUTES(folder_id AS "id", folder_type_id AS "folder_type_id")))),
    XMLELEMENT("document_header",
    XMLELEMENT("document_type",
    XMLATTRIBUTES(document_type AS "id")),
    XMLELEMENT("document_id", document_id),
    XMLELEMENT("document_description", document_description),
    XMLELEMENT("document_date",
    XMLATTRIBUTES(name AS "name"), document_date),
    XMLELEMENT("document_properties")),
    XMLELEMENT("document_data",
    XMLELEMENT("internal_file",
    XMLELEMENT("document_file_path", document_file_path),
    XMLELEMENT("document_extension", document_extension)
    ))))from macess_import_base WHERE rownum < 270000))))AS result
    from macess_import_base WHERE rownum < 270000;
    This is the Macess_Import_Base table that I am creating xml data from
    create table MACESS_IMPORT_BASE
    MACESS_EXP_IMPORT_EXPORT_FILE VARCHAR2(100),
    FILE_HEADER VARCHAR2(20),
    ITEMS VARCHAR2(20),
    DOCUMENTS VARCHAR2(20),
    DOCUMENT VARCHAR2(20),
    EXTERNAL_REFERENCE VARCHAR2(20),
    PROCESSING_INSTRUCTIONS VARCHAR2(20),
    PATENT VARCHAR2(20),
    FILING_INSTRUCTIONS VARCHAR2(20),
    FOLDER_IDS VARCHAR2(20),
    FOLDER_ID VARCHAR2(20),
    FOLDER_TYPE_ID NUMBER(20),
    DOCUMENT_HEADER VARCHAR2(20),
    DOCUMENT_PROPERTIES VARCHAR2(20),
    DOCUMENT_DATA VARCHAR2(20),
    INTERNAL_FILE VARCHAR2(20),
    NAME VARCHAR2(20),
    DOCUMENT_TYPE VARCHAR2(40),
    DOCUMENT_ID VARCHAR2(64),
    DOCUMENT_DESCRIPTION VARCHAR2(200),
    DOCUMENT_DATE VARCHAR2(100),
    DOCUMENT_FILE_PATH VARCHAR2(200),
    DOCUMENT_EXTENSION VARCHAR2(200)
    Directory name to write output to "DIR_PATH"
    DIRECTORY PATH is "\app\cdg\cov"
    Regards,
    Chris

    I also would like to use UTL_FILE to achieve this functionality in the procedure.

  • Limit rows per page, include spacer and format last row on page break

    Hello,
    I am new to BI and would like some help with an issue I don't seem to be able to resolve?
    I have a table that uses two xml group elements (2nd nested inside first) to produce my detail lines.
    Example:-
    First for-each loop runs over shipto details and within this another for-each loop runs over items related to that shipto, all of which results in multiple detail lines.
    I need to limit the number of rows per page and should the data roll over to the next page I need to place a horizontal closing border on the first page's table (only using column borders).
    Also when the data does not fill the page I need to add spacer rows to the page limit?
    I have tried using examples found in these forums, position(), counters etc… but due to having the second detail loop I’m unable to get these working or I’m doing something wrong?
    Your help would be greatly appreciated.

    Hi BIPuser, thanks for the links.
    I have tried some of the examples which I can get working with a single level of detail lines. However when I add the second level of detail lines the position() function seems to fail as my rowlimit appears to be ignored.
    I am also unable to get the $lpp example working because the outer detail loop may only have one xml element and therefore BI assumes only one line is to be printed when in fact the inner xml element detail loop may have further multiple lines. I need to effectively count the outer & inner loops as one to determine the number of lines being processed.
    Example of xml - My table for detail lines needs to include both ShipTo & item number lines grouped as shown, thereby counting & outputting 7 lines in this instance.
    <INVOICE>
    <On_Ship_To_S23> Outer loop
    <On_itm_num_shr_row_S21> Inner Loop
    <On_itm_num_shr_row_S21>
    <On_itm_num_shr_row_S21>
    </On_Ship_To_S23>
    <On_Ship_To_S23>
    <On_itm_num_shr_row_S21>
    <On_itm_num_shr_row_S21>
    </On_Ship_To_S23>
    </INVOICE>

  • NEXT button on report portlet shows 10 rows-maximum rows per page=9999

    I created a report with the DB Provider portlet. I set the maximum rows per page to 9999 when displayed as a portlet and as a full page. I put the portlet on a page and it only shows 10 rows and then the next button.
    If there are exactly 10 rows I get the next button. If I click it the next page loads with no data. If there are less than 10 rows there is no button.
    If I create a new portlet it does not do this. I'm only having the problem with one portlet now but I've seen it in the past. I usually just build the portlet again but I would like to know how to fix it.
    I can't customize the portlet because of bug #3467032.

    Select customize and set the number of rows to 9999. I'm guessing that it's currently set to 10.

  • Problem with number of rows per page ....

    Hi,
    I have a updatable report .This is a dynamic report which can have more than 100 columns depending on the table name .I have set number of rows =15 in layout and pagination .Its displaying 15 rows per page .My requirement is 50 rows per page .So i changed to 50 in layout and pagination .Its displaying 50 rows per page .But when i select some button in that page or move to other tab i get "page not found "error .If i replace back to 15 rows per page ,everything works fine ...Dont know why this is happening ..Please help..
    Thanks in advance ....

    Hello,
    You can use Maximum Records per page property of Repeating
    Frame.
    Adi

  • Rows Per Page doesn't affect the number of records displayed

    I just updated from 3.2 to 4.0 this morning. When I change the Rows Per Page value in the action menu the report doesn't change and the number of records displayed stays at 10. The report has ~6000 records. I edited the report attributes and add the rows selector to the IR search bar. This doesn't change the behavior either. I noticed that if I change the rows per page in the action menu then the drop down select list is updated, but the report still doesn't change from 10. I tried paging to the next set of results and it still remains at 10.
    Has anyone else experienced this problem?
    Tony

    Yes, Tony, I've seen this in several versions of APEX. In most cases, simply starting a new session was enough to force APEX to refresh the page and grab the new set of pagination directives. If that doesn't work, please give more info like: what type of report you are doing and what the Pagination values are. Please note the following:
    Report Template
    Pagination Scheme
    Enable Partial Page Refresh
    Display Position
    Number of Rows/Number of Rows Item
    Maximum Row Count

  • Rows per Page for PIVOT view.

    Hi,
    Is there any way we can show limited no of rows in pivot. Rows per Page for PIVOT view.
    on the click on next one should move to the next page.
    Thanks

    Pagination in Pivot Solves your problem at UI Level only.
    Below is the link that guide you how to implement Pagination in Pivot:
    [http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/]
    Hope it helps you..
    -Vency

  • Rows Per Page option in Pivot view.

    Hi,
    If our report is returning more no of rows and if it is in table view , we have and option in table edit view "Rows per page". Do we have same "Rows per page" option available in Pivot table view.Because i have a report which is returning more than 150 rows and i want only 10 rows to be displayed and then scroll.
    Regards,
    Som.

    Currently, we do not have that for Pivot tables. You can use another approach to show the pagination. I have an example here http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • DBAdapter polling with logical delete x distrib polling x DB rows per trans

    Hi all.
    I'm trying to configure a DBAdapter with "logical delete" polling strategy, distributed polling (cluster environment) and a defined number of "Database Rows per Transaction".
    When I check the box "Distributed Polling", the SQL generated gets appended by "FOR UPDATE NOWAIT"
    However, when I set a value for "Database Rows per Transaction" the "FOR UPDATE NOWAIT" sql clause disappear.
    Is this a bug, or some limitation related to the "logical delete" strategy???
    Thanks
    Denis

    Hi All,
    Actually I'm also facing the same problem.
    Step I follwed:
    1) Created a job_table in database
    create talbe job_table(id, job_name, job_desc, job_status)
    2)created a bpel process to test the Inbound distributed polling.
    3)Configure the DBAdapter for polling.
    a)update a field in the job_table with logical delete.
    b)select the field name form the drop down
    c) change the read value-->Inprogress and unRead value--->Ready
    d) dont change the value for Reserved value
    e) select the check box for "distributed polling".
    f) the query will be appended with "For update NoWait."
    g)click next and then finish.
    4) Then i followed the below steps.
    To enable pessimistic locking, run through the wizard once to create an inbound polling query. In the Applications Navigator window, expand Application Sources, then TopLink, and click TopLink Mappings. In the Structure window, click the table name. In Diagram View, click the following tabs: TopLink Mappings, Queries, Named Queries, Options; then the Advanced… button, and then Pessimistic Locking and Acquire Locks. You see the message, "Set Refresh Identity Map Results?" If a query uses pessimistic locking, it must refresh the identity map results. Click OK when you see the message, "Would you like us to set Refresh Identity Map Results and Refresh Remote Identity Map Results to true?Ó Run the wizard again to regenerate everything. In the new toplink_mappings.xml file, you see something like this for the query: <lock-mode>1</lock-mode>.
    5) lock-mose is not changed to 1 in toplink_mappingss.xml
    Can we edit the toplink_mappings.xml manually.
    If yes, what allt he values Ineed to change in toplink_mappings.xml file, so that it will not pick the same record for the multiple times in clustered environment.
    Please help me out this is urgent.
    Thanking you in advance.

  • Set Maximum Rows Per Page not working

    I want to display 50 rows per page and I tried the below but still I can see the default 15 rows per page.
    Home>Application Builder>Application 301>Page 51>Interactive Report Attributes>Search Bar>Maximum Rows Per Page
    Set to = 50
    Home>Application Builder>Application 301>Page 51>Interactive Report Attributes>Search Bar>Rows Per Page Selector
    Removed the check mark and still shows 15 rows per page.

    Run your report. Set the Rows to 50. Press Go. Select 'Save Report' from the 'magic wheel' menu and next select 'Save as default report settings'.
    It is a rather long way, but seems the only one...
    Roel

Maybe you are looking for