Estimated row count

hello
i used estimatedrowcount on several occasions in my application to hide and show certain parts of the screen (normally in EL expressions)
why is it called ESTIMATED and not EXACT. Of course, there is a reason why i ask,
sometimes and in certain pages in which i add new row, it is not also the case that the value of EstimatedRowcount is always updated when a new row is inserted. Also what if another use is adding rows through the same page but from a different browser (different instance of the same applications).
In other words, when does the framework issues SELECT count() on the page to reflect an updated SELECT count().
In certain situation , i had to create VO in order to make sure that i control that the count() is specifically calculated when i need since i noticed that the default EstimatedRowCount does not always give the expected result and henceforth, could be unwise to depend on it to control the logic
rgds
ammar sajdi
Amman jordan

You are right, the estimated row count does not query the database every time you call the method. It just is designed to give you the estimated row count in the context of the "current query" of the VO. So, you perform a query. After the query is performed, the table binding, for example, calls the getEstimatedRowCount() method to determine how many rows are to be expected (keep in mind that probably not all rows are fetched at once after the query). Nothing wrong with that. The ViewObject is executed, 20 rows are fetched, the estimated row count tells the binding that there are 100 rows in the result. If then another user inserts a new row, then that typically will have no effect on the 100 rows, meaning you won't get 101 rows at a sudden. If you scroll through the result set, you will get the 100 rows. In order to get 101 rows, you will need to re-execute the query. Then the table binding will get the estimated row count and it will be 101.
As soon as the fetch is complete, meaning that all rows are fetched from the database and are in memory, then getEstimatedRowCount() no longer accesses the database (why should it?!) but just returns the count of fetched rows. Of course, taking into account any unposted rows that you may have created.
If you really want the row count from the database, why don't you just call getQueryHitCount()? Why must it be getEstimatedRowCount()?!
Sascha

Similar Messages

  • Problem w/: Error while getting estimated row count for view

    JDev 10.1.3 - Steps
    1. created a ADF VO w/ one bind variable vNAME.
    2. Created a basic jspx page, use the data control pal. to drop in VO w/ executeparam option. Use the data control pal to drop in VO w/ ADF Read-Only Table w/ select and sort option. Selected all VO columns in table.
    3. Following Error msg occurs when running jspx page -
    oracle.jbo.DMLException: Error while getting estimated row count for view object CategoryView, statement SELECT count(1) FROM (SELECT
    CATEGORY.CATID CATID,
    CATEGORY.NAME NAME,
    CATEGORY.PICTURE PICTURE,
    CATEGORY.ACTIVE ACTIVE
    FROM
    CATEGORY
    WHERE
    (CATEGORY.NAME LIKE UPPER(:vName)||'%')) .
    Tested SQL Statement in SQL Worksheet works ok (with a Value replacing ':vName').
    Can anyone advise - seems to be a straight forward process that is returning this error msg. I have tried variations of the SQL stmt with no luck. The jspx page errors when the ADF Read-Only Table is added.

    I seem 2 have the same error, in a slightly different situation.
    I have a view which subclasses a Entity with a history column 'CreatedOn'. When performing a quick search/filter on this column I get the same error. The ADF app is build on a DB2 database, so no named parameters here. Instead invalid SQL is created when executing the estimated row count. The WHERE clause contains 'CreatedOn = null', should be 'CreatedOn is null'. Furthermore the input of my quick search is not filled in this clause.
    Any help would be appreciated

  • Estimated Row Count Query. How to avoid?

    Hi,
    I use Jdeveloper 9.0.3. Production to evaluate its capability with swing JClient. I found that before the form is shown on the desktop the framework runs the quety like this.
    SELECT /*+ ORDERED USE_NL(RtEmployee) USE_NL(RtUnitmeasure) USE_NL(RtGroupcode) */ count(1) FROM (SELECT RtProduct.PRODUCTID, RtProduct.ID_UM, RtUnitmeasure.SHORTNAMERUS, RtProduct.ID_COMMON, RtProduct.NAMERUS, RtProduct.NAMEENG, RtProduct.ID_GROUPCODE, RtGroupcode.GROUPCODE, RtProduct.IS_GRCODEFAULT, RtProduct.VAT, RtProduct.PRICE_U, RtProduct.MINPRICE, RtProduct.MARKUP, RtProduct.IS_DISCOUNT, RtProduct.NOTE, RtEmployee.SURNAME, RtProduct.CREATEDATE, RtProduct.MODIFYDATE, RtProduct.ID_OPERATOR, RtProduct.ID, RtUnitmeasure.ID AS ID1, RtGroupcode.ID AS ID2, RtEmployee.ID AS ID3 FROM RT_PRODUCT RtProduct, RT_EMPLOYEE RtEmployee, RT_UNITMEASURE RtUnitmeasure, RT_GROUPCODE RtGroupcode WHERE ((RtProduct.ID_OPERATOR = RtEmployee.ID)AND (RtProduct.ID_UM = RtUnitmeasure.ID))AND (RtProduct.ID_GROUPCODE = RtGroupcode.ID))
    to estimate dataset cardinality.
    Attention development team. Plase pay attention that the statement is badly formed as
    Hints entered into "Query Hint" field of the VO is placed in outer query but intended to use in sub query and will not be taken into account by optimizer!
    My question is how to avoid this query and/or how can I replace a functionality for estimating dataset cardinality by user defined function or so?
    Best regards,
    Vyacheslav

    I tried the suggested solution but could not figure
    out how to get the current query string to extract
    the WHERE clause to use in my own query or to get the
    parameters to build my own WHERE. How about a more
    explicit code example?
    Joe:
    A few different ways to do this. First, note that getQueryHitCount()
    method receives the following parameter:
    ViewRowSetImpl viewRowSet
    To get the entire query statement, you can call
    String entireQuery = vo.getQuery();
    For each row set (identified by the viewRowSet parameter), you have a
    set of where-clause parameters. Some of these are user provided
    (through setWhereClauseParam calls) and some of these are system
    provided (system provided params are primarily for view links).
    To get all where-clause params (both user and system params), you
    call:
    Object[] paramVals = viewRowSet.getParametersAsStorageTypes();
    Again, paramVals include both user and system param vals.
    If you do
    int noUserParams = viewRowSet.getWhereClauseParams().length;
    noUserParams will tell how many of these are user supplied:
    paramVals[0] .. paramVals[noUserParams-1] are user supplied and the
    rest are system supplied.
    If you want to get the Long postings are being truncated to ~1 kB at this time.

  • SyncFx Throughput Estimations - Row Counts per Second?

    We're in the middle of some prototyping work and have many unanswered questions. We're liking what we see from the SyncFx framework overall. We're looking to do some estimations on timing and throughput. Anyone have any experience/wisdom/data on the amount
    of time it takes a SyncFx app to synchronize a table of 500K rows? 
    Table sizes in our production app could vary from 8 to 20 columns and be up to 1M rows from a single production environment. Any thoughts on how long an initial synchronization would take for tables that size?

    I also found this:
    problem found: the JVM is running on Windows XP with netbios over
    TCP/IP activated. On connect() the JVM tries to resolve the hostname
    (java.net.InetAddress.getHostFromNameService, getHostByAddr).
    Windows tries a netbios ns query on udp port 137 with a timeout of
    1500ms, ignores any ICMP "port unreachable" packages and repeats this
    two more times, adding up to a value of 4.5 seconds (!).
    Deactivating netbios "fixes" this, but isn�t always an option ... any
    ideas very welcome.
    Greets,
    guenter <gd--acm-org>

  • Row Count

    What I would like to do is do row counts across 2 schemas with same tables and see if there are any differences in row counts and if there is any would like to generate an email and alert the user.
    Is it possible?

    Hello,
    Yes it is possible, you need to
    grant select on user2.table_name1 to user1; (you can grant select to all tables of user2 to user1 or otherway) and then write pls/sql procedure to send email using utl_smtp.
    Check this link for example
    http://www.quest-pipelines.com/newsletter-v2/smtp.htm
    Regards
    Edited by: OrionNet on Dec 30, 2008 5:48 PM

  • There was an error while updating row count for "SH".."SH".CHANNELS

    Hi All,
    Am new to OBIEE.Pls help in this regard.
    Am building the physical layer as per Repository guide.When am importing the data in to this,am getting the below error.
    *"There was an error while updating row count for "SH".."SH".CHANNELS" :"*
    channles is the table name and having 5 rows.
    but am able to see the data in the sql prompt. like SELECT * FROM SH.CHANNELS then 5 rows data would be displaying..
    pls help in this regard and where is the excat problem?
    Thanks,

    what is the error?
    Make sure that your connection pool settings are okay..
    Make sure that, you are using correct driver in case of if you are using ODBC dsn..
    Also make sure that, your oracle server is running... TNS and Oracle server services

  • DataTable.Rows.Count property is occasionally wrong

    I have a web service in C#.NET which calls a stored procedure using ADO.NET. The stored procedure is always returning 1 row, which is then loaded into a DataTable. The Rows.Count property of the DataTable is then examined.
    When this web service is called repeatedly with numerous requests, it occasionally returns Rows.Count as 0 when it should be 1. I have debugged and examined it at runtime and found that there is indeed 1 row in the datatable, but that the Rows.Count property
    is 0.
    Is this a known bug?
    I'm using .Net Framework 2.0
    Note: This is an issue that occurs very rarely. My testing shows that it takes about 90 minutes to recreate it when you have 2 concurrent processes sending requests repeatedly at a rate of about 10 requests per second.

    Are you sure that there aren't multiple threads access the DataTable?
    Can you post a repro? 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Dynamically set maximum row count in Interactive Report

    Hi,
    Has anyone worked out a way of dynamically setting (e.g. via select list) the maximum row count value for an Interactive Report, taking into account issues with order by when the report is filtered. I'm aware of solutions like this: http://www.talkapex.com/2010/10/apex-reports-no-limit-downloads.html but as far as I can tell this doesn't work when the report is filtered and the IR is rewritten in the background. Data sets then become unreliable because they are reordered.
    Thanks,
    Mike

    Hi Mike,
    You can do that with javascript
    gReport.search('SEARCH',100)the 100 you can replace for any number you like.I have a report with filter,sorting and groups and it is gives no problem there.
    any number means any number but not higher than the number you set at Maximum Rows Per Page.
    You probably can mix the solution from Martin and the above code.
    Regards,
    Kees Vlek
    <tt>Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66</tt>
    If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.
    Edited by: kvlek on 24-apr-2013 12:29
    Edited by: kvlek on 24-apr-2013 12:35

  • How to add the Row count(number of rows in table)  in  the table header?

    Hi,
    I'm having a table. This table is viewed when i click on a search button.
    <b>On the table header it should dynamically display the number of rows in the table, i.e., the row count.</b>
    How to do this? could any one explain me with the detailed procedure to achieve this.
    Thanks & Regards,
    Suresh

    If you want to show a localized text in the table header, you should use the <b>Message Pool</b> to create a (parameterized) message "tableHeaderText" like "There are table entries".
    Next, create a context attribute "tableHeaderText" of type "string" and bind the "text" property of the table header Caption UI element to this attribute.
    Whenever the table data has changed (e.g. at the end of the supply function for the table's data source node), update the header text:
    int numRows = wdContext.node<TableDataSourceNode>().size();
    String text = wdComponentAPI.getTextAccessor().getText
      IMessage<ComponentName>.TABLE_HEADER_TEXT,
      new Object[] { String.valueOf(numRows) }
    wdContext.currentContextElement().setTableHeaderText(text);
    Maybe you want to provide a separate message for the case that there are no entries.
    Alternatively, you can make the attribute calculated and return the header text in the attribute getter.
    Armin

  • Unable to get the row count of supplier site for each supplier

    Hi,
    In the sourcing module, suppliers page is having an advanced table in which there is a field 'supplier' and another filed 'supplier sites' (supplier field is of type picklist).Now, how can i get the count of 'supplier sites' for each supplier???

    Hi sumit,
    Thanks for the reply, can u please help in writing the code to loop through the VO...
    I was trying to get the first row and then finding the count of supplier sites, but in each iteration of for loop(for each row) i am getting the same count value for each and every row...
    Code :
    int j=vo.getrowcount();//count of no. of rows
    for (int i=0;i<j;i++)
    row=(xxVORowImpl)rowsetiterator.getRowAtRangeIndex(1);
    int a=am.getSupplierSitesVO.getRowCount();//this is the view object in the pick list
    oapagecontext.writeDiagnostics(this,"value of   a is :"+a,1);
    this code is giving row count of last row of supplier.
    How to get the count for each and every row of supplier sites ?
    Thanks.

  • How to get row count(*) for each table that matches a pattern

    I have the following query that returns all tables that match a pattern (tablename_ and then 4 digits). I also want to return the row counts for these tables.
    Currently a single column is returned: tablename. I want to add the column RowCount.
    DECLARE @SQLCommand nvarchar(4000)
    DECLARE @TableName varchar(128)
    SET @TableName = 'ods_TTstat_master' --<<<<<< change this to a table name
    SET @SQLCommand = 'SELECT [name] as zhistTables FROM dbo.sysobjects WHERE name like ''%' + @TableName + '%'' and objectproperty(id,N''IsUserTable'')=1 ORDER BY name DESC'
    EXEC sp_executesql @SQLCommand

    The like operator requires a string operand.
    http://msdn.microsoft.com/en-us/library/ms179859.aspx
    Example:
    DECLARE @Like varchar(50) = '%frame%';
    SELECT * FROM Production.Product WHERE Name like @Like;
    -- (79 row(s) affected)
    For variable use, apply dynamic SQL:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Rows count all tables:
    http://www.sqlusa.com/bestpractices2005/alltablesrowcount/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • APEX 3.1 Report pagination style limited by max row count

    I am working on an application using APEX 3.1 and am having trouble keeping the report pagination style as a select list when the max row count for the report is greater than 8000. If I use the select list as the pagination method, the first time that the first page is viewed is fine however all subsequent pages begin to use the "next" and "previous" link method of pagination. This is only occurring when the max row count is higher than 8000 and a select list is used for pagination.
    My question is: is the style of pagination, in Oracle APEX (3.1), limited by the potential number of rows returned for the report? If not, is this a bug with my version of Oracle APEX?

    The source of my problem was that the report referenced a page item for the number of rows. That select list referenced a named List of Values (LOV) that limited the number of rows that the report could display. I removed that reference and my problem disappeared!

  • Error while updating row counts

    Hello,
    I have created a connection pool and while trying to do "update all row counts" i am getting the following error.
    [NQODBC][SQL_ATATE:HY000][NQSError: 10058]A general error has occured.
    [NQSError: 43093] Anerror occured while processing the EXECUTE PHYSICAL statement.
    [NQSError: 17001] ORacle error code:942, message:ORA-00942: table or view does not exist at OCI call OCIstmtExecute
    [NQSError: 17010] SQL statement preparation failed.
    Please provide any suggestions.
    Thanks in Advance.

    hi..
    make sure that the data source name and credentials you given in connection pools are correct...
    Also, make sure that the db-user specified in the connection pool has permissions on that table...
    And make sure that the table name is correct and existing in that schema..

  • Obiee oracle gateway error while updating row count

    Hi ,
    OBIEE server 11.1.1.5 ,oracle server11g installed in linux 64bit,
    while updating row count in Admin tool i am getting the following error
    [NQODBC][SQL_STATE:HY000][nQSError:10058] A general error has occured.
    [nQSError: 43113]Message returned from OBIS.
    [nQSError:43093]An error occured while processing the EXECUTE PHYSICAL statement.
    [nQSError:17003]Oracle gateway error: OCIEnvNIsCreate or OCIEnvInit failed to initialize environment.Please check your Oracle Client installation and make sure the correct version of OCI libraries are in the library path.
    i am able to check the database from sqlplus it is working fine.
    Any suggestion highly appreciated plzzz

    Make sure your connection pool is valid and able to import or execute reports.
    If everything good as above said, in Physical layer database properties-> general tab choose the database version and try it once.
    If not
    Check the doc id 1271486.1
    Or
    To resolve the issue create a softlink (ln -s) in the <OracleBI>/server/Bin folder to link to the 32-bit Oracle Client Driver file.
    The example below shows how to perform a softlink from the 64 bit directory:
    cd /u10/app/orcladmin/oracle/OracleBI/server/Bin
    ln -s $ORACLE_HOME/lib32/libclntsh.so.10.1 libclntsh.so.10.1
    If helps mark

  • Not able to update row count in Physical Layer..connection failed in OBIEE 11g

    Hi Guys,
    I am not able to do Update Row count in the Physical Layer, i am getting an error The Connection has failed. This is in OBIEE 11g Linux env.
    I have put the tnsnames.ora file in the below path:
    /*****/pkgs/linux/intel/OBIEE_DIT/MW_HOME/Oracle_BI1/network/admin/
    I do not have admin under
    /****/pkgs/linux/intel/OBIEE_DIT/MW_HOME/oracle_common/network/
    But if i put the whole TNS entry in the Data Source Name i am able to connect:
    (DESCRIPTION =(ADDRESS = (PROTOCOL= TCP) (HOST= xxx.xxx.com) (PORT= 1671))(CONNECT_DATA = (SERVICE_NAME = US1OBIEE)))
    I am not able to understand the issue..
    Thanks,
    Amit

    Looks like rpd is looking for local tns config... try to use as hostname:port/ServiceName
    This should work, just in case not working! stop doing so since it is know issue.
    If helps mark

Maybe you are looking for

  • Integartion of Business objects explorer with ABAP ALV

    Hello all, We have a requirement to integrate one of our applications with business objects explorer. The complete details is as listed below: 1. Our application basically collects feedback provided by users and then displays an ALV with all the feed

  • Purchase order pricing condition

    Hi,    we have a item level condition of octroi value in my purchase order. even though user is maintaining during po creation it's not impacting total po value. how to check this and configure to have impact on total po? what is the meaning and impa

  • Updatexml on xmltype variable

    Is there a way to update the XML in an xmltype variable? I don't want to have to use the sql commands update ... set that constrain me to changing XML already stored in a table. For example this is what I would like to do. If I have the following XML

  • Question on the Adobe Captivate 6.x Google LMS Widget With Email Reporting

    Im looking to use the Adobe Captivate 6.x Google LMS Widget With Email Reporting to collect quiz answers and results but due to security issues I would like to put the results directly into a databse and not into google. Does anyone have any experien

  • Deplyment in iPlanet Web Server 6.0

    Hi Here is the log output that i received after deploying in iPlanet web server 6.0 from a war file. It contains the jsps, servlet classes, beans, and ejb classes. I have my ejbs deployed in weblogic server 8.1 Can anybody help? Thankyou. [31/Mar/200