Delay when querying from CUBE_TABLE object, what is it?

Hi Guys,
We are using Oracle OLAP 11.2.0.2.0 with an 11g Cube, 7 Dimensions, Compressed and partitioned by Month.
We have run into a performance issue when implementing OBIEE.
The main issue we have is a delay while drilling on a hierarchy. Users have been waiting 7-12 seconds per drill on a hierarchy, and the query is only returning a few cells of data. We have managed to isolate this to slow performing queries on CUBE_TABLE.
For example, the following query returns one cell of data:
SELECT FINSTMNT_VIEW.BASE, FINSTMNT_VIEW.REPORT_TYPE, FINSTMNT_VIEW.COMPANY, FINSTMNT_VIEW.SCENARIO, FINSTMNT_VIEW.PRODUCT, FINSTMNT_VIEW.ACCOUNT, FINSTMNT_VIEW.SITE, FINSTMNT_VIEW.TIME
FROM "SCHEMA1".FINSTMNT_VIEW FINSTMNT_VIEW
WHERE
FINSTMNT_VIEW.REPORT_TYPE IN ('MTD' )
AND FINSTMNT_VIEW.COMPANY IN ('E01' )
AND FINSTMNT_VIEW.SCENARIO IN ('ACTUAL' )
AND FINSTMNT_VIEW.PRODUCT IN ('PT' )
AND FINSTMNT_VIEW.ACCOUNT IN ('APBIT' )
AND FINSTMNT_VIEW.SITE IN ('C010885' )
AND FINSTMNT_VIEW.TIME IN ('JUN11' ) ;
1 Row selected in 4.524 Seconds
Note: FINSTMNT_VIEW is the automatically generated cube view.
CREATE OR REPLACE FORCE VIEW "SCHEMA1"."FINSTMNT_VIEW" ("BASE","REPORT_TYPE", "COMPANY", "SCENARIO", "PRODUCT", "ACCOUNT", "SITE", "TIME")
AS
SELECT "BASE", "REPORT_TYPE", "COMPANY", "SCENARIO", "PRODUCT", "ACCOUNT", "SITE", "TIME"
FROM TABLE(CUBE_TABLE('"SCHEMA1"."FINSTMNT"') ) ;
If we increase the amount of data returned by adding to the query, it only increased the query time by .4 seconds
SELECT FINSTMNT_VIEW.BASE, FINSTMNT_VIEW.REPORT_TYPE, FINSTMNT_VIEW.COMPANY, FINSTMNT_VIEW.SCENARIO, FINSTMNT_VIEW.PRODUCT, FINSTMNT_VIEW.ACCOUNT, FINSTMNT_VIEW.SITE, FINSTMNT_VIEW.TIME
FROM "SCHEMA1".FINSTMNT_VIEW FINSTMNT_VIEW
WHERE
FINSTMNT_VIEW.REPORT_TYPE IN ('MTD' )
AND FINSTMNT_VIEW.COMPANY IN ('E01' )
AND FINSTMNT_VIEW.SCENARIO IN ('ACTUAL' )
AND FINSTMNT_VIEW.PRODUCT IN ('PT' )
AND FINSTMNT_VIEW.ACCOUNT IN ('APBIT' )
AND FINSTMNT_VIEW.SITE IN ('C010885', 'C010886', 'C010891', 'C010892', 'C010887', 'C010888', 'C010897', 'C010893', 'C010890', 'C010894', 'C010896', 'C010899' )
AND FINSTMNT_VIEW.TIME IN ('JUN11' ) ;
12 rows selected - In 4.977 Seconds
If we increase the data returned even more:
SELECT FINSTMNT_VIEW.BASE, FINSTMNT_VIEW.REPORT_TYPE, FINSTMNT_VIEW.COMPANY, FINSTMNT_VIEW.SCENARIO, FINSTMNT_VIEW.PRODUCT, FINSTMNT_VIEW.ACCOUNT, FINSTMNT_VIEW.SITE, FINSTMNT_VIEW.TIME
FROM "SCHEMA1".FINSTMNT_VIEW FINSTMNT_VIEW
WHERE
FINSTMNT_VIEW.REPORT_TYPE IN ('MTD' )
AND FINSTMNT_VIEW.COMPANY IN ('ET', 'E01', 'E02', 'E03', 'E04' )
AND FINSTMNT_VIEW.SCENARIO IN ('ACTUAL' )
AND FINSTMNT_VIEW.PRODUCT IN ('PT', 'P00' )
AND FINSTMNT_VIEW.ACCOUNT IN ('APBIT' )
AND FINSTMNT_VIEW.SITE IN ('C010885', 'C010886', 'C010891', 'C010892', 'C010887', 'C010888', 'C010897', 'C010893', 'C010890', 'C010894', 'C010896', 'C010899' )
AND FINSTMNT_VIEW.TIME IN ('JUN11', 'JUL11', 'AUG11', 'SEP11', 'OCT11', 'NOV11', 'DEC11', 'JAN12') ;
118 rows selected - In 14.213 Seconds
If we take the time for each query and divide by the number of rows, we can see that querying more data results in a much more efficient query:
Time/Rows returned:
1 Row - 4.524
12 Rows - 0.4147
118 Rows - 0.120449153
It seems like there is an initial delay of approx 4 seconds when querying the CUBE_TABLE object. Using AWM to query the same data using LIMIT and RPR is almost instantaneous...
Can anyone explain what this delay is, and if there is any way to optimise the query?
Could it be the AW getting attached before each query?
Big thanks to anyone that can help!

Thanks Nasar,
I have run a number of queries with logging enabled, the things you mentioned all look good:
Loop Optimization: GDILoopOpt     COMPLETED
Selection filter: FILTER_LIMITS_FAST     7
ROWS_FAILED_FILTER     0
ROWS_RETURNED     1
Predicates: 7 pruned out of 7 predicates
The longest action I have seen in the log is the PAGING operation... but I do not see this on all queries.
Time Total Time OPERATION
2.263     27.864          PAGING     DYN_PAGEPOOL     TRACE     GREW     9926KB to 59577KB
1.825     25.601          PAGING     DYN_PAGEPOOL     TRACE     GREW     8274KB to 49651KB
1.498     23.776          PAGING     DYN_PAGEPOOL     TRACE     GREW     6895KB to 41377KB
1.232     22.278          PAGING     DYN_PAGEPOOL     TRACE     GREW     5747KB to 34482KB
1.17     21.046          PAGING     DYN_PAGEPOOL     TRACE     GREW     4788KB to 28735KB
1.03     19.876          PAGING     DYN_PAGEPOOL     TRACE     GREW     3990KB to 23947KB
2.808     18.846          PAGING     DYN_PAGEPOOL     TRACE     GREW     3325KB to 19957KB
What is strange is that the cube operation log does not account for all of the query time. For example:
SELECT "BASE_LVL" FROM TABLE(CUBE_TABLE('"EXAMPLE"."FINSTMNT"'))
WHERE
"RPT_TYPE" = 'MTD' AND
"ENTITY" = 'ET' AND
"SCENARIO" = 'ACTUAL' AND
"PRODUCT" = 'PT' AND
"GL_ACCOUNT" = 'APBIT' AND
"CENTRE" = 'TOTAL' AND
"TIME" = 'YR09';
This query returns in 6.006 seconds using SQL Developer, if I then take the CUBE_OPERATION_LOG for this query and subtract the start time from the end time, I only get 1.67 seconds. This leaves 4.3 seconds unaccounted for... This is the same with the my other queries, see actual time and logged time below:
Query     Actual     Logged      Variance
S3     6.006     1.67     4.336
L1     18.128     13.776     4.352
S1     4.461     0.203     4.258
L2     4.696     0.39     4.306
S2     5.882     1.575     4.307
Any ideas on what this could be or how I can capture this 4.3 second overhead?
Your help has been greatly appreciated.

Similar Messages

  • Oracle spawning parallel 128 processes when queried from Cognos

    Hi,
    I am querying a parallel enabled table with DOP set to default. Oracle 11.2 is installed on a 16 core machine while Cognos sits on a 4 core linux system. When querying the same table fromToad, I observe 32 parallel processes. Any thoughts as to why the difference and why that many number of processes get spawned from Cognos?
    Thanks

    What and what are you runnng and how are they configured?
    I ask this because what you are seeing could be as a reulst of so many factors.
    An example is that if you are using Planning Contributor, then you are likely to have more processes reading and writing to the database at the same time. The number of processes will then depend on serveral issues. For instance the number of CPUs on the box, the number of Contributor Applications, the number of Publish Containers and the interval the jobs are configured to run. Using a scenario where you have a single monitorin job on a 2 cpu box for 10 Contributor Applications. Ths may spawn up to 20 processes. To make things worse, if you happen to have some of the previous 20 processes not completing before the next job interval, then it adds more to the number you see.

  • Got error when query from QaaWS.

    Hello expert.
    I have some problem about QaaWS.
    When I create and build my query then click next to run query it appear error
    Get data provider warning
    getDocumentInformation exception (Error: WIS 10901)
    A database error occured. The database error text is: (CS) "Specified RDBMS is invalid" . (WIS 10901)
    But when I query in Web Intelligence Rich Client it work normally.
    When I enter url http://<hostname>:8080/dswsbobje/services/Session
    I got message.
    "Please enable REST support in WEB-INF/conf/axis2.xml and WEB-INF/web.xml"
    Please give me some suggestion
    Thank you.
    - Chai -

    Hello.
    I have a 32bit window version.
    Thank you.
    And the problem about CLASSPATH is solve.
    The solution is I add  the path in the file "jdbc.sco"
    on C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer\jdbc
    as below.
    <DataBase Active="Yes" Name="DB2 v9">
                <Class JARFile="dbd_jdbc,dbd_db2">com.businessobjects.connectionserver.java.drivers.jdbc.db2.DB2Driver</Class>
                <JDBCDriver>
              <ClassPath>
              <Path>C:\PROGRA~1\IBM\SQLLIB4\java\db2java.zip</Path>
              <Path>C:\PROGRA~1\IBM\SQLLIB4\java\db2jcc.jar</Path>
              <Path>C:\PROGRA~1\IBM\SQLLIB4\function</Path>
              <Path>C:\PROGRA~1\IBM\SQLLIB4\java\db2jcc_license_cu.jar</Path>
              </ClassPath>
                    <Parameter Name="JDBC Class">com.ibm.db2.jcc.DB2Driver</Parameter>
                    <Parameter Name="URL Format">jdbc:db2://$DATASOURCE$/$DATABASE$</Parameter>
                </JDBCDriver>
    But When I query form QaaWS it appear the same error.
    Please help.
    Thank you.
    -chai-
    Edited by: ChaiChai2 on Jul 15, 2009 11:10 AM

  • Mobile account login delay when offline from Active Directory

    We're getting a few MacBook Pros setup with our AD domain. All is well while on the network, but when traveling, it takes our users about 20-30 seconds to login, presumably because the client is trying to authenticate against a domain controller. Accounts are setup as mobile accounts so the credentials are cached locally.
    It's frustrating that a solution isn't more readily published by Apple given how common a use case this is. It shouldn't be buried somewhere in a forum.

    I figured it was because AD was somehow being looked up. I got it nailed down the the wireless connection. Turning off the AirPort connection is not a viable option as not all users are savvy enough, or remember to turn it off before taking their laptop home. One instructor was setup this way and she's isn't happy with the "resolve".
    On further research, I have determined a plausible solution, at least with Mac OS 10.4.7. I haven't tested anything earlier. Open the System Preferences and then Network. Show the AirPort configuration, then click on the Option button located next the checkbox to show the AirPort status in the menu bar. There's a checkbox in there to "Disconnect from wireless networks when I log out." By checking this, the wireless connection will be disconnected but the card will remain on. This will force the computer to use the cached credentials on log in. When the user logs in, the computer will attempt to reestablish a connection with the wireless network.
    I'll let you know if this works with other Macs as well.

  • Problem in Using Time Stamp when Querying from SQl Server to ODBC linked server

    I am using Following Query for my subject pupose but facing different Issues, Error Also shown after Query
    Query IS:
    DECLARE @sql varchar(8000)
    SELECT @sql = 'SELECT * FROM OPENQUERY(TEST, ' +
                  '''SELECT * FROM SCHEMA.OAUSER.Tag_Value ' +
                  'WHERE Tag_id = ''''GROUP_1SEC.COOLING_TOWERS.MOTORS.AG001.CURRENT.CV'''''+
                  ' AND timestamp = ''''{ts ''''2014-z02-18 15:28:38'''' }'''''')'
    PRINT @sql
    EXEC(@sql)
    And i am getting this Error:
    OLE DB provider "MSDASQL" for linked server "TEST" returned message "[DataDirect][OpenAccess ODBC]Syntax error in SQL statement. syntax error line 1 at or after token <2014>.".
    Msg 7321, Level 16, State 2, Line 1
    Please Guide me.
    Regards;
    Siraj

     Sorry "Z" was written by mistake
    I am using :
    DECLARE @sql varchar(8000)
    SELECT @sql = 'SELECT * FROM OPENQUERY(TEST, ' +
                  '''SELECT * FROM SCHEMA.OAUSER.Tag_Value ' +
                  'WHERE Tag_id = ''''GROUP_1SEC.COOLING_TOWERS.MOTORS.AG001.CURRENT.CV'''''+
                  ' AND timestamp = ''''{2014-02-18 15:28:38}'''''')'
    PRINT @sql
    EXEC(@sql)
    And Getting this error:
    OLE DB provider "MSDASQL" for linked server "TEST" returned message "[DataDirect][OpenAccess ODBC]Error getting the literal value of right operand.".

  • Video but No audio when playing  from ITunes. What could be wrong?

    I'm trying to play video from iTunes on my Apple TV. I get the video but no audio. I am able to view from Netflix fine. What could be the problem?

    Welcome to the Apple Community.
    Try adjusting the audio out and dolby digital settings.

  • Long delays when switching from anything to xterm; Security Update 2008-001

    I just updated my computer and rebooted. After it all came up again I opened Safari, selected a url and copied it, clicked on my x-term and it stayed behind my browser! After an excruciating delay of nearly a second, it came up on top. This makes me frequently mark large chunks of text in my xterms by mistake, which of course messes up my cut and paste buffer. I could not believe this so I actually used a stopwatch and it gives me 1.32s between clicking on the xterm until it appears on top.
    I can switch just fine between Safari and iTunes, but Safari and xterm gives this behavior. Same with iTunes and xterm. This makes my computer practically useless and I have no idea how to fix it!

    Good News!
    No OS is perfect, you just get to choose the most important features for you.
    PS. Sometimes things do "just work", but we can do little things to increase those odds on our own.

  • JPA query by entity/object ?

    I am trying to write an abstract API which dynamically assigns any Entity Class that needs to be persisted and retrieved using the Entity Manager.
    Saving into the database is not a problem, I just do entityManager.save(Class) and it works for any class that needs to be persisted.
    However, when querying for the object based upon the attributes, I want to avoid naming particular attributes and want to use the Entity class's attributes against itself for querying.
    For example, the client program will say something like this to query by name and age of a Person:
    -------calling (client) program: ---
    Person p = << get from UI, not saved yet, no Id but has all other attributes like name and age etc. >>
    List<Person> persons = dao.getAllThatMatch(p);
    --- end client Program --
    --- DAO class ---
    List<T> getAllThatMatch(T t) {  //note that expectation is that returned is a list of Object which is the same as the querying object
    List<T> entityList = em.someFinderMethod(t);
    //the someFinderMethod method should automatically query for all Person objects that match the attributes provided by the object of Person supplied as criteria
    //NOTE: there is no attribute mentioned extensively like name, age etc.
    return entityList ;
    -- end DAO class --
    Edited by: user7626479 on Feb 6, 2013 3:55 PM
    Edited by: user7626479 on Feb 6, 2013 3:55 PM

    Query by example is not included in the JPA standard, but it is possible to do with EclipseLink.
    See http://wiki.eclipse.org/EclipseLink/Examples/JPA/ORMQueries#Query_By_Example
    for how to use query by example with native EclipseLink queries. To execute a native query through JPA, you will need to call createQuery(DatabaseQuery query) on the org.eclipse.persistence.jpa;JpaEntityManager obtained from the javax.persistence.EntityManager instance by calling getDelegate() or unwrap.
    Best Regards,
    Chris

  • Displaying properties from two objects in a datagrid

    Previously I post a discussion on this matter on Flex learning path and haven't got any response on how to do this so I figured that I might as well try again here.
    I'm using drag and drop binding in flash builder 4 on a data-grid. However, the data I need to show need to be query from another object.
    <mx:DataGrid id="dataGrid2" dataProvider="{getMajorDetailsResult.lastResult}">
                <mx:columns>
                    <mx:DataGridColumn headerText="Category Name" />
                    <mx:DataGridColumn headerText="Require Credits" dataField="requireCredits" resizable="false" width="40"/>
                </mx:columns>
    </mx:DataGrid>
    In this datagrid I bind it with an object MACL which has
    - ID
    - CAT_ID
    - requireCredits
    However, I would like to display CategoryName in the first column but categoryName is in another Object (category)
    - CAT_ID
    - CategoryName
    In this case what should I do?
    I did this so that if in the future Category Name needs to be rename. I can just rename the one in category table.
    Any help is highly appreciated.
    Thank you

    You should use a model that references the two data sources to mae the one input to the DataGrid:
    http://livedocs.adobe.com/flex/3/html/help.html?content=datamodels_3.html
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance
    www.ChikaraDev.com
    Flex Development and Support Services

  • Expert mode query in View objects and appended where clause

    My company is Oracle Member Partner and we are developing enterprise web applications using Oracle database and BC4J.
    I have the following problem...
    When I enable EXPERT MODE option in View Object I have trouble appending to query statement in my client code.
    I need expert mode because I must use "SELECT DISTINCT" insted of "SELECT" in my query.
    It looks something like this:
    viewObject.setWhereClause("CLA_ID = " + claId);
    viewObject.executeQuery();
    SQL query from View Object becomes sub-query and fails to execute:
    select * from (original view object query) where (... appended where clause)
    Order by part of the query causes sql errors because original query is now sub-query.
    Is there any way around this?

    I tried creating an expert mode SQL query:
    SELECT DISTINCT EMPNO, ENAME FROM EMP.
    Then at runtime I do:
    vo.setWhereClause("ENAME LIKE '%'||?||'%');
    vo.setWhereClauseParam(0,'A');.
    and this works fine. The trick is that since expert-mode view objects get wrapped as inline views (to allow runtime appending of WHERE clause, actually), you need to select any column in the select statement to which you want to later refer in a dynamically-appended where clause.
    If you want to prevent the inline-view wrapping, you can write the following code in your view object's ViewObjectImpl subclass to force the VO to NOT be treated as an expert-mode SQL VO.
      // Goes in your view object impl subclass
      public void create() {
         // Force this VO to NOT be treated as an expert-mode SQL, so that
         // its query does not get wrapped as an inline view.
         getViewDef().setFullSql(false);
      }I used this trick above to create an expert mode query like:
    SELECT DISTINCT deptno FROM empand then at runtime I add a dynamic where clause that refers to a column
    in EMP that is not in the select list like this:
        ViewObject vo = am.findViewObject("View1");
        vo.setWhereClause("ename like '%A%'");
        vo.executeQuery();
        System.out.println(vo.first().getAttribute(0));and this causes the query to come out as:
    SELECT DISTINCT deptno FROM emp WHERE ename like '%A%'.
    instead of:
    SELECT * FROM (SELECT DISTINCT deptno FROM emp) QRSLT WHERE ename like '%A%'which would cause an error due to the fact that ename is not in the select list of the original (wrapped, inline) query.

  • Long Delay When Print Commands Sent To HP Wireless Officejet

    I have an HP Officejet Pro 8500 connected via a wireless connection to my home LAN. I have a late 2009 iMac (ethernet connection) running the latest release of Snow Leopard. Both the HP printer device and scanner device show up as installed in the Print & Fax settings of preferences with full functionality and they both work. The printer is normally idle (in sleep mode) until one sends a command. Any print command sent from any Mac OS X application to the device takes about 40 seconds to wake up the device if it is idle. Print commands sent from Windows XP applications running via a bootcamp partition wake up the printer instantly.  Print commands sent from any other Windows OS based computer connected wirelessly on the LAN also wake the HP instantly.
    I would appreciate any ideas as to why there is this delay when printing from Snow Leopard.

    I installed from the HP CD that came with the Officejet. It says MAC OS X v104, v10.5, Version 9.8.0 (I assume this is the HP version) and then updated to the 2/11 Apple HP Driver update. So I appear to have followed your advice.
    Note that Print & Fax preferences shows 2 devices for the Officejet. One is the printer and the other device is the fax. The printer has both printer and scan tabs. The fax does work as I just tried it. When I open the printer utility for the printer from within preferences, two devices are listed: The printer (green) and I can access the settings. The Fax identifed in its name as being at teh same ip address, but is is in red and the settings can not be accessed.
    I opened the embedded web server to look at all the settings. I'm using DHCP.
    Here is what I found under Networking:
    Host name is correct.
    Proxy setting are blank, which is correct.
    Network Protocols are set to Both IPv4 and IPv6
    Under Wireless: IPv4 Addressing is set to Automatic IP & Automatic DNS Server. IPv6 is empty. The Advanced settings are all under Infrastructure and correct. Ad Hoc settings are blank. Compatibility has the 2nd item checked that says in an Ad Hoc network use 811.b behavior.
    Anything else that may be helpful

  • When working with aRGB images, what changes must be made when printing?

    Working in the Adobe RGB color space requires that all components in the chain (camera, software, monitor, printer) be able to handle aRGB. When printing from Photoshop Elements, what changes (if any) need to be made at printing time?

    Thanks Michel.
    I knew about the "more options" dialog box and use it regularly to set
    ICC profiles for my Canon Pro9500 Mark II printer, ensuring also that
    "Photoshop Elements manages colors". I could have asked the question
    better perhaps: "When working with aRGB images, how can I set both an
    ICC printer profile for a specific paper and ensure that printer uses
    the aRGB color space?". As far as I can tell, you can set an aRGB
    profile (either in Photoshop or at the level of the printer), but you
    can't use both the aRGB profile and an ICC paper profile at the same
    time. I am assuming that you can't set an ICC profile for the paper in
    Photoshop Elements and at the same time use the printer's aRGB driver.
    Is that right?
    Craig.

  • Error when trying to delete a query from production

    Hi Experts,
    When i tried to delete a query from <b>production system</b> using RSZDELETE, I am getting an error message like " Query object 42BYOKUXDNZBZKMC2VHR5Z19H is blocked. Deletion has been cancelled."
    i went to E071 table using SE16,and found out the transports which contains this particular object.This transports have returned error code 8.
    Can anyone help me on deleting this object entry from these requests?
    <b>How will I delete this particular object entry from these transport requests?</b>
    Thanks alot
    Shobin

    Hi Venkat,
    Thanks alot for your quick reply.
    I tried that also. But even those transports are not successful.
    I would like to know <b>what is the standard procedure to delete objects from a transport request in production</b>.
    Already, I unlocked the transport request to Modifiable status.
    Thanks alot
    Shobin

  • IPhone 4s Voice Memo App has 5 second delay when the record button is pressed. When it starts recording, it goes from 0 seconds to 5 or so seconds recorded. This happens randomly and often and sometimes has the delay but starts at zero. Solution Anyone?

    After iOS 7 update, my iPhone 4s Voice Memo App has 5 second delay when the record button is pressed. When it starts recording, it goes from 0 seconds to 5 or so seconds that it shows has recorded. This happens randomly and often, sometimes it will have the 5+ second delay but starts recording at zero seconds. Besides the delay it has been working fine as far as saving and playback is concerned. I have plenty of storage on the phone itself and it NEVER had this problem before I updated to iOS 7. I've reset the phone a couple times by holding down the power and home buttons at the same time. The reason I have an issue with this is that I'm always recording song ideas, melodies, and scratch takes; what I'm saying is when I come up with an idea I need to be able to know that when I hit record it will start right then so I don't forget anything that has just popped in my mind.
    Does anyone have a solution or suggestion?
    Thanks

    After iOS 7 update, my iPhone 4s Voice Memo App has 5 second delay when the record button is pressed. When it starts recording, it goes from 0 seconds to 5 or so seconds that it shows has recorded. This happens randomly and often, sometimes it will have the 5+ second delay but starts recording at zero seconds. Besides the delay it has been working fine as far as saving and playback is concerned. I have plenty of storage on the phone itself and it NEVER had this problem before I updated to iOS 7. I've reset the phone a couple times by holding down the power and home buttons at the same time. The reason I have an issue with this is that I'm always recording song ideas, melodies, and scratch takes; what I'm saying is when I come up with an idea I need to be able to know that when I hit record it will start right then so I don't forget anything that has just popped in my mind.
    Does anyone have a solution or suggestion?
    Thanks

  • How to stop delay when streaming data from a script as URL to an Applet?

    I have a strange problem and do not know what is causing it. Hope someone here with some experience can help.
    I have a Java Applet which makes a line graph of data. The data source is to be streaming, where the first chunk of data comes from what is already in a data file, and then new data is sent whenever it is ready. The problem in brief is that if I just collect and show the data from the data file and do not stream everything works fine. If I also have the streaming and wait for a long time, everything works fine, but when the applet is first loaded, the graph is not shown until after a long delay time.
    Here is a snippet of the applet code:
             String dataendpoint = "http://phpfunction.php";
             URL url = new URL(dataendpoint);
             InputStream is = url.openStream();
             String line;
             InputStreamReader isr = new InputStreamReader(is);
             BufferedReader br = new BufferedReader(isr);
             while ((line = br.readLine()) != null) {
                   // my code here to handle each line of data which prepares it for
                   // showing on a line graph.
             } In the above, I show the dataendpoint variable hardcoded, but in reality this comes as an Applet parameter. It is a URL of a php script which is on the same server as the applet's code and there are no access problems here.
    The PHP script does the following: It first opens a data file, parses it and prints it out to its standard output using echo or printf statements. The script then enters a loop where it periodically looks to see if new data has been made available. If so, that new data is also printed out to the standard output.
    The PHP script looks like this (in pseudo code):
       // open data files, read lines, and send to standard output using echo
       // flush buffers using ob_flush() and flush() calls
       while (1) {
          sleep(30);
          // get new data, if any, then send to standard output
          // flush buffers again
       Again my problem: If I have the PHP script exit before the while loop everything works fine, my applet makes the graph immediately.
    However, if I include the while loop, then initially the applet does not appear, not until some time afterwards, and then the applet works like it should, scrolling along every time new data arrives.
    I have done a Wireshark sniff and I can see that the initial data is being sent out the the browser and applet immediately. So I do not think it is a buffering problem on the PHP side.
    I have wrapped every Applet code line with debug print statements and from the Java console I see that the Java Applet is stopping at this line:
    InputStream is = url.openStream();
    Can someone explain what is happening here? Why the delay in returning from the openStream() function and how to avoid it?
    By the way, the server is Linux and the Applet is being run on Windows Vista, and I have tried both Internet Explorer and Firefox, both give the same behavior.
    Thanks in advance!
    Steve, Denmark

    I still cannot solve this problem, but I have some more observations:
    1) yes it is a JApplet, and yes, the data streaming is performed in a separate thread.
    2) Wireshark sniffing shows that data sent out by the PHP datasource on the server is sent immediately, and is not buffered (am using ob_start(), ob_flush() and flush() alls in the PHP script).
    3) On Windows Vista, using Internet Explorer or Firefox, there is a constant 30 second delay before the Applet returns from this line: InputStream is = url.openStream();
    4) After this 30 seconds, data appears in the Applet, but it can be seen also with java console debug prints that the data seems to be buffered. The newest data shown in the Applet is not the newest data sent to the client by the PHP datasource script.
    5) On a SUSE Linux client, the Applet works as it should, there is no delay time in showing the data.
    It appears as if there is on Windows a buffering of data which I do not wish to have and which does not occur on Linux. I need to find out how to get the URL openStream() call to return immediately allowing the initial data to be read and shown on the Applet. And I need to remove the buffering of data so that the data can be shown on the Applet when it arrives.
    Can anyone help? Why does this work on Linux but not on Windows, and what can I do, at best within the Java code, to get the Applet to work on Windows as it does on Linux?
    Thanks!
    Steve, Denmark

Maybe you are looking for

  • Alert status GREY in BPM configuration

    Hello Everybody, I am configuring BPM in Solution Manager for "Order to Cash" process concentrating on "IDOC monitoring". The IDOC monitor will monitor the IDOC status in my ECC system, so no need to define interfaces. The configuration is completed

  • Vector smart objects still looking for older version of Illustrator

    When we try to open smart objects from withing Photoshop CC, they're looking for Illustrator CS6. On machines where Illustrator CS6 is uninstalled we get errors. All the file associations in Bridge are correctly set. Is there a way to change the file

  • HTML  Parsers and reading all files in a directory

    Hello all, I was wondering if there was a html parser included in java. I am writing a program where I want to be able to search all the files in a directory tree for a particular string. I was able to read one file in a single directory but not in a

  • Help!!!!  iphoto book lost

    i just spent 6 hours creating a book of my wife's and my world travels for her christmas present. literally as i was looking over it as a final review (90 pages) iphoto crashed and when restarted the book was gone. i'm running 10.5 and have the HD ba

  • Characterstic Value Error in Report

    Hi Gurus, Please help me out in resolving the below issue.. I have a report based on a DSO , When I try to run the report  , I get an error which says that the value of one of the characterstic is invalid. The characterstic is ZCH_DESC of type CHAR a