Exporting SCOM Performance, Problem Alerts with PowerShell to CSV?

Is there a way to export System Center Operations Manger Performance and Problem Alerts to a CSV with the number of Counts and Milliseconds for the application that caused the issue?
When using System Center Operations Manager to gather performance events on applications, it would be nice to be able to export this data out to Excel. 
Is there a PowerShell script that is available to export different event types? For example with for a performance alert or a problem alert, or highest usage. 
Using System Center 2012 R2.
Thank you!
Jeff

Hi Jeff,
I dont have a powershell script , But surely have a SQL query which will pull the performance data from the operationsmanager DB.
Below is the one.
select Path, ObjectName, CounterName, InstanceName, SampleValue, TimeSampled
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where ObjectName = 'Memory' and CounterName = 'Available MBytes' and Path like '%Your Agent name%'
order by countername, timesampled
You will need to mention the Object name and counter for what you are looking for and in the path mention the agent name.
If you want the counter for all the agents then the Command should be altered as follows: Path like '%%'
'%%' - Represents that you want the perfmon data of the specific Object and counter on all the SCOM Agents.
===============================
==============================================
All perfmon data of all servers:
select Path, ObjectName, CounterName, InstanceName, SampleValue, TimeSampled
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where ObjectName LIKE '%%' and CounterName LIKE '%%' and Path like '%%'
order by countername, timesampled
====================================================
All perfmon data for only a specific agent:
select Path, ObjectName, CounterName, InstanceName, SampleValue, TimeSampled
from PerformanceDataAllView pdv with (NOLOCK)
inner join PerformanceCounterView pcv on pdv.performancesourceinternalid = pcv.performancesourceinternalid
inner join BaseManagedEntity bme on pcv.ManagedEntityId = bme.BaseManagedEntityId
where ObjectName LIKE '%%' and CounterName LIKE '%%' and Path like '%Your Agent name%'
order by countername, timesampled
Gautam.75801

Similar Messages

  • Problem Alerts with Lenovo Solution Centre (Thinkpad B50-30)

    Hello All,
    I am experiencing problems with the Lenovo Solution Centre on a brand new Lenovo B series laptop B50-30 Windows 8.1.
    First off upon booting the laptop for the first time I was getting an alert message for the warranty saying. it was not available.
    I thought this may have been due to the fact that on warranty status, the start date was incorrect. I did email a copy of the receipt and the date has now been corrected. However, I am still getting an alert in the Lenovo Solution Centre saying warranty not available (please see first picture).
    I looked around the web and found one solution that involved uninstalling Lenovo Solution Centre, rebooting, reinstalling Lenovo Solution Centre and rebooting but that hasn't helped.
    In fact now, I am getting two alerts. The same warranty alert again and one about storage devices (please see second picture).
    The Lenovo Solution Centre is saying that a partition on the hard drive has less than 9.5% available (third picture) but as you can see in the fourth attached picture there is plenty of space. I have only had the laptop a week and there is hardly anything on there.
    Can anyone help?
    Thanks in Advance
    L
    Link to image 1
    Link to image 2
    Link to image 3
    Link to image 4
    Moderator note: large image(s) converted to link(s):  About Posting Pictures In The Forums

    The alerts about low available space in a partition showed up with the latest version of LSC.
    There are 2 other posts here with the same type alert message.
    Maybe the next release of LSC will address the issue (bug).

  • Performance problem - mutexes with multi-cpu machine

    Hi!
    My company is developing multi-threaded server program for
    multi-cpu machine which communicates with Oracle database on separate
    machine. We use Solaris 7, Workshop 5 CC and pthreads API.
    We tested our program on 4 CPU E4500 with 2 CPU E420 Oracle server.
    We upgraded E4500 from 4 to 8 CPU and to our surprise instead of
    performance improvement we got performance degradation ( 8 CPU runs
    about 5% slower than 4 CPU ).
    After a long investigation we found out that under stress load most of the
    time our performs lwpmutex related operation.
    With truss -c statistics was 160 secs in mutex operations and
    about 2 secs was read/write in oracle client side library.
    Here is output of truss for example:
    19989 29075/5: 374.0468 0.0080 lwp_mutex_lock(0x7F2F3F60 = 0
    19990 29075/31: 374.0466 0.0006 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19991 29075/5: 374.0474 0.0006 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19992 29075/30: 374.0474 0.0071 lwp_mutex_lock(0x7F2F3F60) = 0
    19993 29075/30: 374.0484 0.0010 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19994 29075/31: 374.0483 0.0017 lwp_mutex_lock(0x7F2F3F60) = 0
    19995 29075/5: 374.0492 0.0018 lwp_mutex_lock(0x7F2F3F60) = 0
    19996 29075/31: 374.0491 0.0008 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19997 29075/5: 374.0499 0.0007 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19998 29075/30: 374.0499 0.0015 lwp_mutex_lock(0x7F2F3F60) = 0
    19999 29075/5: 374.0507 0.0008 lwp_mutex_lock(0x7F2F3F60) = 0
    20000 29075/30: 374.0507 0.0008 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20001 29075/5: 374.0535 0.0028 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20002 29075/30: 374.0537 0.0030 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20003 29075/31: 374.0537 0.0046 lwp_mutex_lock(0x7F2F3F60) = 0
    20004 29075/5: 374.0547 0.0012 lwp_mutex_lock(0x7F2F3F60) = 0
    20005 29075/31: 374.0546 0.0009 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20006 29075/5: 374.0554 0.0007 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20007 29075/30: 374.0557 0.0020 lwp_mutex_lock(0x7F2F3F60) = 0
    20008 29075/31: 374.0555 0.0009 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20009 29075/5: 374.0564 0.0010 lwp_mutex_lock(0x7F2F3F60) = 0
    20010 29075/30: 374.0564 0.0007 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20011 29075/5: 374.0572 0.0008 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20012 29075/28: 374.0574 0.0170 lwp_mutex_lock(0x7F2F3F60) = 0
    20013 29075/31: 374.0575 0.0020 lwp_mutex_wake(0x7F2F3F60) = 0
    We have a several question:
    1. We always get the same mutex address : 0x7F2F3F60 even with different
    binaries. It looks that all threads wait on one and magic
    mutex. Why?
    2. We read in article on unixinsider.com that on Solaris when mutex is
    unlocked all the threads waiting on this mutex are waked up. It also looks so
    from truss output. What is solution for this problem? unixinsider.com
    recommends native Solaris read-write lock with all threads as writers?
    Is there any other solution? Should in improve performance?
    3. We heard that Solaris 8 has better pthreads implementation using a
    one-level threading model, where threads are one-to-one with
    lwp, rather than the two-level model that is used in the
    standard libthread implementation, where user-level threads are
    multiplexed over possibly fewer lwps. Are mutexes in this library
    behave in "Solaris 7" way or do it put thread to sleep when it unlocks
    the mutex? Is it possible to use this library on Solaris 7?
    4. Is there plug - in solution like mtmalloc or hoard for new/delete that change
    pthread mutexes?
    Thank you in advance for your help,
    Alexander Indenbaum

    <pre>
    Hi!
    My company is developing multi-threaded server program for
    multi-cpu machine which communicates with Oracle database on separate
    machine. We use Solaris 7, Workshop 5 CC and pthreads API.
    We tested our program on 4 CPU E4500 with 2 CPU E420 Oracle server.
    We upgraded E4500 from 4 to 8 CPU and to our surprise instead of
    performance improvement we got performance degradation ( 8 CPU runs
    about 5% slower than 4 CPU ).
    After a long investigation we found out that under stress load most of the
    time our performs lwpmutex related operation.
    With truss -c statistics was 160 secs in mutex operations and
    about 2 secs was read/write in oracle client side library.
    Here is output of truss for example:
    19989 29075/5: 374.0468 0.0080 lwp_mutex_lock(0x7F2F3F60) = 0
    19990 29075/31: 374.0466 0.0006 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19991 29075/5: 374.0474 0.0006 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19992 29075/30: 374.0474 0.0071 lwp_mutex_lock(0x7F2F3F60) = 0
    19993 29075/30: 374.0484 0.0010 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19994 29075/31: 374.0483 0.0017 lwp_mutex_lock(0x7F2F3F60) = 0
    19995 29075/5: 374.0492 0.0018 lwp_mutex_lock(0x7F2F3F60) = 0
    19996 29075/31: 374.0491 0.0008 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19997 29075/5: 374.0499 0.0007 lwp_mutex_wakeup(0x7F2F3F60) = 0
    19998 29075/30: 374.0499 0.0015 lwp_mutex_lock(0x7F2F3F60) = 0
    19999 29075/5: 374.0507 0.0008 lwp_mutex_lock(0x7F2F3F60) = 0
    20000 29075/30: 374.0507 0.0008 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20001 29075/5: 374.0535 0.0028 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20002 29075/30: 374.0537 0.0030 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20003 29075/31: 374.0537 0.0046 lwp_mutex_lock(0x7F2F3F60) = 0
    20004 29075/5: 374.0547 0.0012 lwp_mutex_lock(0x7F2F3F60) = 0
    20005 29075/31: 374.0546 0.0009 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20006 29075/5: 374.0554 0.0007 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20007 29075/30: 374.0557 0.0020 lwp_mutex_lock(0x7F2F3F60) = 0
    20008 29075/31: 374.0555 0.0009 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20009 29075/5: 374.0564 0.0010 lwp_mutex_lock(0x7F2F3F60) = 0
    20010 29075/30: 374.0564 0.0007 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20011 29075/5: 374.0572 0.0008 lwp_mutex_wakeup(0x7F2F3F60) = 0
    20012 29075/28: 374.0574 0.0170 lwp_mutex_lock(0x7F2F3F60) = 0
    20013 29075/31: 374.0575 0.0020 lwp_mutex_wakeup(0x7F2F3F60) = 0
    We have a several question:
    1. We always get the same mutex address : 0x7F2F3F60 even with different
    binaries. It looks that all threads wait on one and magic
    mutex. Why?
    2. We read in article on unixinsider.com that on Solaris when mutex is
    unlocked all the threads waiting on this mutex are waked up. It also looks so
    from truss output. What is solution for this problem? unixinsider.com
    recommends native Solaris read-write lock with all threads as writers?
    Is there any other solution? Should in improve performance?
    3. We heard that Solaris 8 has better pthreads implementation using a
    one-level threading model, where threads are one-to-one with
    lwp, rather than the two-level model that is used in the
    standard libthread implementation, where user-level threads are
    multiplexed over possibly fewer lwps. Are mutexes in this library
    behave in "Solaris 7" way or do it put thread to sleep when it unlocks
    the mutex? Is it possible to use this library on Solaris 7?
    4. Is there plug - in solution like mtmalloc or hoard for new/delete that change
    pthread mutexes?
    Thank you in advance for your help,
    Alexander Indenbaum
    </pre>

  • [Solved] Performance Problems (Hitching) with Source Engine games ( CSGO, DOTA 2)

    Hey All,
    I have a GT70 2PC Dominator.
    When I play CSGO I have a problem where the game will randomly hitch/hang for up to 5 seconds. Whatever audio is playing will just continue to loop until the everything goes back to normal. My FPS tends to hover around 120 FPS and dips pretty low. This happens in DOTA 2 as well but to a much much lesser extent.
    I play CSGO on my desktop as well so I am very familiar with the configuration files etc. My FPS_MAX is set to 300 so it' s not capped I have no idea what's going on. I've tried lowering graphic settings etc. While I'm very familiar with CSGO this is my first gaming laptop.
    I did run windows update and the nvidia update through the geforce experience so all of my drivers should be up to date as well.
    I've tried setting the battery to "High Performance" to see if that would change anything. I made sure I was plugged into a laptop as well. But I'm not sure if there are any specific MSI settings or something else to turn on.
    I play other graphically intensive games on higher settings probably the most notable is the MMORPG ArchAge. While I may experience slow downs I never have the game just hitch or hang like it does in CSGO.
    Any help would be greatly appreciated!
    Thanks All!

    Quote from: brackstone;112334
    Even if that worked I would not want that to be the solution. SSDs have a shorter lifespan than HDD and I'd rather not put a lot of stuff on it considering the replacement cost.
    I'm pretty sure MSI feels the same way as they've labeled it "OS_Install"
    What's the brand/model of your HDD?
    1. Try to remove HDD high usage related activities by following FAQs.
        I) http://www.msi.com/pic/faq/[email protected]
        II) http://www.msi.com/faq/nb-740.html
    2. Install The Crystal Disk Info utility and the HDD supports the APM feature, then change its setting.
        I)  Set the APM Control to the highest, in order to prevent the drive enters stand by mode after certain time.
           *Make sure you set the function everytime you restart the system.
           a. Download and install the crystal disk info utility.
           b. Open CrystalDiskInfo.
           c. Choose Function > Advanced Feature > APM Control.
           d. Choose your hard drive.
           e. Set APM function to FEh Maximum performance.
        II) Set the power plan to the maximum. (Control Panel> Hardware and Sound> Power Options>(Hide additional plans) High performance.

  • Performance problem with CR SDK

    Hi,
    I'am currently on a customer site and I have the following problem :
    The client have a performance problem with a J2EE application wich call a Crystal report with th CR SDK. To reproduce the problem on the local machine (the CR server), I have developped a little jsp page wich used the Crystal SDK to open a Crystal report on the server (this report is based on a XML data source), setting the new data source (with a new xml data flow) and refresh the report in PDF format.
    The problem is that the 2 first sequences take about 5 seconde each (5 sec for the opening report and 5 seconds for the setting data source). Then the total process take about 15 seconds to open and refresh the document that is very long for a little document.
    The document is a 600Ko file, the xml source is a 80Ko file.
    My jsp page is directly deployed on the tomcat of the Crystal Report Server (CRXIR2 without Service Pack).
    The Filestore and the MySQL database are on the CR server.
    The server is a 4 quadripro (16 proc) with 16Go of RAM and is totally dedicated to Crystal Report. For the moment, there is no activity on the server (it is also used for the test).
    The mains jsp orders are the followings :
    IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("administrator", "", "EDITBI:6400", "secEnterprise");
        IInfoStore infoStore = (IInfoStore) es.getService("", "InfoStore");
        IInfoObjects infoObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME='CPA_EV' AND SI_INSTANCE=0 ");
        IInfoObject report = (IInfoObject) infoObjects.get(0);
    IReportAppFactory reportAppFactory = (IReportAppFactory)es.getService("RASReportFactory");
    ReportClientDocument reportClientDoc = reportAppFactory.openDocument(report.getID(), 0, null);
    IXMLDataSet xmlDataSet = new XMLDataSet();
    xmlDataSet.setXMLData(new ByteArray(ligne_data_xml));
    xmlDataSet.setXMLSchema(new ByteArray(ligne_schema_xml));
    DatabaseController db = reportClientDoc.getDatabaseController();
    db.setDataSource(xmlDataSet, "", "");
    ByteArrayInputStream bt = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
    My question is : does this method is the good one to do this ?
    Thank's in advance for your help
    Best regards
    Emmanuel

    Hi,
    My problem is not resolved and I have'nt news from the support.
    If you have any idea/info, don't forget me
    Thank's in advance
    Emmanuel

  • Performance problem with WPF Viewer CRVS2010

    Hi,
    We are using Crystal Reports 2010 and the new WPF Viewer. Last week when we set up a test machine to run our integration tests (several hundred) all report tests failed (about 30 tests) with a timeout exception.
    The testmachine setup:
    HP DL 580 G5
    WMWare ESXi 4.0
    Guest OS: Windows 7 Enterprise 64-bit
    Memory (guest OS): 3GB
    CPU: 1
    Visual Studio 2010
    Crystal Reports for Visual Studio 2010 with 64 bit runtime installed
    Visual Studio 2008 installed
    Microsoft Office 2010 installed
    Macafee antivirus
    There are about 10 other virtual machines on the same HW.
    I think the performance problem is related to text obejcts on a report document viewed in a WPF Viewer. I made a simple WPF GUI with 2 buttons and the first button executes a very simple report that only has a text object with a few words in it and the other button is also a simple report with only 1 text object with approx. 100 words (about 800 charchters).
    The first report executes and displays almost instantly and the second report executes instantantly but displays after approx. 1 min 30 sec.
    And execute in this context means that all VB.Net code runs in the compiler without any exception or performance problem. The performance problem seems to come after viewer.Show() (in the code below) has executed.
    I did another test on the second report and replaced the text obejct with a formula field with the same text as the text object and this test executed and displayed the report instantly.
    So the performance problem seems to have something to do with rendering of textobjects in the WPF Viewer on a virtual machine with the above setup.
    I've made several tests on local machines with Windows XP (32 bit) or Winows 7 (64 bit) installed and none of them have this performance problem. Its not a critical issue for us because our users will run this application on their local PCs with Windows 7 64-bit but its a bit problematic for our project not being able to run all of our integration tests but I will probably solve this by using a local PC instead.
    Here is the VB.Net code Im using to View the reports:
    Private Sub LightWeight_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
            Dim lightWeightReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            lightWeightReport.Load(Environment.CurrentDirectory & "\LightWeight.rpt")
            ' Initialize Viewer
            Dim viewer As LF.LIV.PEAAT.Crystal.Views.ReportViewer = New LF.LIV.PEAAT.Crystal.Views.ReportViewer()
            viewer.Owner = Me
            viewer.reportViewer.ViewerCore.ReportSource = lightWeightReport
            viewer.Show()
        End Sub
        Private Sub LightWeightSlow_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
            Dim lightWeightReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            lightWeightReport.Load(Environment.CurrentDirectory & "\LightWeightSlow.rpt")
            ' Initialize Viewer
            Dim viewer As LF.LIV.PEAAT.Crystal.Views.ReportViewer = New LF.LIV.PEAAT.Crystal.Views.ReportViewer()
            viewer.Owner = Me
            viewer.reportViewer.ViewerCore.ReportSource = lightWeightReport
            viewer.Show()
        End Sub
    The reports are 2 empty default reports with only 1 textobject on the details section.
    // Thomas

    See if the KB [
    [1448013  - Connecting to Oracle database. Error; Failed to load database information|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433343338333033313333%7D.do] helps.
    Also the following may not hurt to have a look at (if only for ideas):
    [1217021 - Err Msg: "Unable to connect invalid log on parameters" using Oracle in VS .NET|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313337333033323331%7D.do]
    [1471508 - Logon error when connecting to Oracle database in a VS .NET application|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433373331333533303338%7D.do]
    [1196712 - Error: "Failed to load the oci.dll" in ASP.NET application against an Oracle database|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333133393336333733313332%7D.do]
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Performance problem with S873,S691,S679,S716

    Hi All,
    I am using tables S873,S691,S679,S716 in my report. Since these have huge data its creating performance problem. Right now i am selecting data from tables as Select single.. in Loop.. endloop.
    If i try to get it out and use FOR ALL ENTRIES, its taking longer time.
    I dont have all keys with me and i m trying to use index whereever possible.
    Any hints, comments are really appreciable.
    My code goes like this.
    This is not a full code... only a part where i am fetching data from 'S' tables.
    loop at i_mvke.
    SELECT kunnr zzobklgq zzcbklgq
    FROM s679 INTO
    (s679-kunnr,s679-zzobklgq,s679-zzcbklgq) WHERE
    matnr EQ i_mvke-matnr AND
    vrsio EQ p_versn AND
    sptag IN s_billed AND
    werks EQ p_werks AND
    vkorg EQ i_mvke-vkorg AND
    kunnr IN s_kunnr.
    SELECT SUM( zznslqty ) FROM s691 INTO
    w_s691_net_bill_qty WHERE
    Use index Z5
    matnr EQ i_mvke-matnr AND
    spmon EQ w_spmon AND
    vrsio EQ p_versn AND
    werks EQ p_werks AND
    vkorg EQ i_mvke-vkorg AND
    kunnr IN s_kunnr."
    SELECT SUM( zznslqty ) SUM( zzninvnum ) FROM s873 INTO
    (work01-zznslqty, work01-zzninvnum) WHERE
    use index Z02
    vkorg EQ i_mvke-vkorg AND
    werks EQ p_werks AND
    matnr EQ i_mvke-matnr AND
    sptag IN s_billed AND
    vrsio EQ p_versn AND
    kunnr IN s_kunnr.
    SELECT zcrdotov FROM s716 INTO s716-zcrdotov WHERE
    matnr EQ i_mvke-matnr AND
    sptag IN s_billed AND
    vkorg EQ i_mvke-vkorg AND
    kunnr IN s_kunnr AND
    werks = p_werks AND
    vrsio EQ p_versn.
    GET THE RECORD TOTAL
    ADD 1 TO w_s716_total_count.
    GET THE ONTIME TOTAL
    IF s716-zcrdotov = 1.
    ADD 1 TO w_s716_ontime_count.
    ENDIF.
    ENDSELECT.
    PERFORM fill_output_table.
    endloop. "i_mvke
    Message was edited by: Agasti Kale

    hi
    good
    wrong->
    SELECT kunnr zzobklgq zzcbklgq
    FROM s679 INTO
    (s679-kunnr,s679-zzobklgq,s679-zzcbklgq) WHERE
    matnr EQ i_mvke-matnr AND
    vrsio EQ p_versn AND
    sptag IN s_billed AND
    werks EQ p_werks AND
    vkorg EQ i_mvke-vkorg AND
    kunnr IN s_kunnr.
    write->
    SELECT kunnr zzobklgq zzcbklgq
    FROM s679 INTO CORRESPONDING FIELDS OF TABLE I_MVKE
    WHERE
    matnr EQ i_mvke-matnr AND
    vrsio EQ p_versn AND
    sptag IN s_billed AND
    werks EQ p_werks AND
    vkorg EQ i_mvke-vkorg AND
    kunnr IN s_kunnr.
    do the changes accordingly in the below select statements. you have not post the detail report otherwise i could have help you in other select statements also.
    thanks
    mrutyun

  • Performance problems with Leopard 10.5.1

    Hello,
    I use an iMac 24 Alu 2,8Ghz and upgraded to Leopard. There are some major performance problems and bugs in the recent version of Leopard:
    1. While accessing USB devices, the display speed, windows moving, animations etc. slow down
    2. Adobe CS3 Photoshop 10.01 and Flash CS3 are sometimes extremly slow. I tried the recent demo packages from Adobe:
    2.1. The Photoshop dialogue "save for web" slows down the system completly, and this problem stays when quitting Photoshop. A restart is neccessary then.
    2.2. Flash CS3 movie preview is very slow and stuttering. It's so slow you cannot imagine how the real movie flow will be.
    2.3. Recent Flash Player 9,0,115,0 with hardware acceleration enabled doesn't really work with QuartzGL enabled Leopard: The movies slow down a lot. Try www.neave.tv for example.
    3. Safari, Mail and other bundled software hang sometimes. You have to force quit them then. It doesn't matter whether QuartzGL is enabled or not. This especially happens to my system if it is online for some hours.
    4. A lot of Apple applications doesn't seem to work with 2dextreme enabled. Why this? Apple supporters told me in Leopard there will be a much better 2dextreme support. Also Quartz2dExtreme in OSX 10.4 worked with all applications and i guess it's the same feature like "QuartzGL" in Leopard. So Leopard isn't finished here. It would be nice if Apple could make it's own software QuartzGL compatible.
    5. Very often the desktop slows down or lags. This is the main reason I often still witch to Windows XP PC to do work in a faster, less annoying way.
    6. Safari crashes randomly sometimes. It is unstable still. Also it crashes more often if you resize/move the window a lot, so I guess it is a graphics extension-related problem.
    I hope you people from Apple will fix these annoying points and optimize your new system in the next update release.
    Best regards

    Thanks for you answer. I repaired in the way as described above. There were some errors, some file index was wrong (don't remember exactly the phrase), now the DU reports the partition was successfully repaired / the volume appears to be ok.
    The crashes in Safari are gone, but all other described problems still exist. Adobe CS3 is not really usable for me.
    By the way, in iMacSoftwareUpdate 1.3, which was replaced by OSX 10.5.1 update, there is one extension called AppleVADriver.kext that does not exist in the OSX 10.5.1 update. Is it an important extension?

  • Performance problems with jdk 1.5 on Linux plattform

    Performance problems with jdk 1.5 on Linux plattform
    (not tested on Windows, might be the same)
    After refactoring using the new features from java 1.5 I lost
    performance significantly:
    public Vector<unit> units;
    The new code:
    for (unit u: units) u.accumulate();
    runs more than 30% slower than the old code:
    for (int i = 0; i < units.size(); i++) units.elementAt(i).accumulate();
    I expected the opposite.
    Is there any information available that helps?

    Here's the complete benchmark code I used:package test;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.LinkedList;
    import java.util.Vector;
    public class IterationPerformanceTest {
         private int m_size;
         public IterationPerformanceTest(int size) {
              m_size = size;
         public long getArrayForLoopDuration() {
              Integer[] testArray = new Integer[m_size];
              for (int item = 0; item < m_size; item++) {
                   testArray[item] = new Integer(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testArray[index]);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayForEachDuration() {
              Integer[] testArray = new Integer[m_size];
              for (int item = 0; item < m_size; item++) {
                   testArray[item] = new Integer(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testArray) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayListForLoopDuration() {
              ArrayList<Integer> testList = new ArrayList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testList.get(index));
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayListForEachDuration() {
              ArrayList<Integer> testList = new ArrayList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testList) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getArrayListIteratorDuration() {
              ArrayList<Integer> testList = new ArrayList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              Iterator<Integer> iterator = testList.iterator();
              while(iterator.hasNext()) {
                   builder.append(iterator.next());
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getLinkedListForLoopDuration() {
              LinkedList<Integer> testList = new LinkedList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testList.get(index));
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getLinkedListForEachDuration() {
              LinkedList<Integer> testList = new LinkedList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testList) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getLinkedListIteratorDuration() {
              LinkedList<Integer> testList = new LinkedList<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testList.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              Iterator<Integer> iterator = testList.iterator();
              while(iterator.hasNext()) {
                   builder.append(iterator.next());
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getVectorForLoopDuration() {
              Vector<Integer> testVector = new Vector<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testVector.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (int index = 0; index < m_size; index++) {
                   builder.append(testVector.get(index));
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getVectorForEachDuration() {
              Vector<Integer> testVector = new Vector<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testVector.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              for (Integer item : testVector) {
                   builder.append(item);
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
         public long getVectorIteratorDuration() {
              Vector<Integer> testVector = new Vector<Integer>();
              for (int item = 0; item < m_size; item++) {
                   testVector.add(item);
              StringBuilder builder = new StringBuilder();
              long start = System.nanoTime();
              Iterator<Integer> iterator = testVector.iterator();
              while(iterator.hasNext()) {
                   builder.append(iterator.next());
              long end = System.nanoTime();
              System.out.println(builder.length());
              return end - start;
          * @param args
         public static void main(String[] args) {
              IterationPerformanceTest test = new IterationPerformanceTest(1000000);
              System.out.println("\n\nRESULTS:");
              long arrayForLoop = test.getArrayForLoopDuration();
              long arrayForEach = test.getArrayForEachDuration();
              long arrayListForLoop = test.getArrayListForLoopDuration();
              long arrayListForEach = test.getArrayListForEachDuration();
              long arrayListIterator = test.getArrayListIteratorDuration();
    //          long linkedListForLoop = test.getLinkedListForLoopDuration();
              long linkedListForEach = test.getLinkedListForEachDuration();
              long linkedListIterator = test.getLinkedListIteratorDuration();
              long vectorForLoop = test.getVectorForLoopDuration();
              long vectorForEach = test.getVectorForEachDuration();
              long vectorIterator = test.getVectorIteratorDuration();
              System.out.println("Array      for-loop: " + getPercentage(arrayForLoop, arrayForLoop) + "% ("+getDuration(arrayForLoop)+" sec)");
              System.out.println("Array      for-each: " + getPercentage(arrayForLoop, arrayForEach) + "% ("+getDuration(arrayForEach)+" sec)");
              System.out.println("ArrayList  for-loop: " + getPercentage(arrayForLoop, arrayListForLoop) + "% ("+getDuration(arrayListForLoop)+" sec)");
              System.out.println("ArrayList  for-each: " + getPercentage(arrayForLoop, arrayListForEach) + "% ("+getDuration(arrayListForEach)+" sec)");
              System.out.println("ArrayList  iterator: " + getPercentage(arrayForLoop, arrayListIterator) + "% ("+getDuration(arrayListIterator)+" sec)");
    //          System.out.println("LinkedList for-loop: " + getPercentage(arrayForLoop, linkedListForLoop) + "% ("+getDuration(linkedListForLoop)+" sec)");
              System.out.println("LinkedList for-each: " + getPercentage(arrayForLoop, linkedListForEach) + "% ("+getDuration(linkedListForEach)+" sec)");
              System.out.println("LinkedList iterator: " + getPercentage(arrayForLoop, linkedListIterator) + "% ("+getDuration(linkedListIterator)+" sec)");
              System.out.println("Vector     for-loop: " + getPercentage(arrayForLoop, vectorForLoop) + "% ("+getDuration(vectorForLoop)+" sec)");
              System.out.println("Vector     for-each: " + getPercentage(arrayForLoop, vectorForEach) + "% ("+getDuration(vectorForEach)+" sec)");
              System.out.println("Vector     iterator: " + getPercentage(arrayForLoop, vectorIterator) + "% ("+getDuration(vectorIterator)+" sec)");
         private static NumberFormat percentageFormat = NumberFormat.getInstance();
         static {
              percentageFormat.setMinimumIntegerDigits(3);
              percentageFormat.setMaximumIntegerDigits(3);
              percentageFormat.setMinimumFractionDigits(2);
              percentageFormat.setMaximumFractionDigits(2);
         private static String getPercentage(long base, long value) {
              double result = (double) value / (double) base;
              return percentageFormat.format(result * 100.0);
         private static NumberFormat durationFormat = NumberFormat.getInstance();
         static {
              durationFormat.setMinimumIntegerDigits(1);
              durationFormat.setMaximumIntegerDigits(1);
              durationFormat.setMinimumFractionDigits(4);
              durationFormat.setMaximumFractionDigits(4);
         private static String getDuration(long nanos) {
              double result = (double)nanos / (double)1000000000;
              return durationFormat.format(result);
    }

  • Performance problems with new Java Tiger style recommendations

    Performance problems with jdk 1.5 on Linux plattform
    (not tested on Windows, might be the same)
    using the new style recommendations.
    I need fast Vector loops for high speed mathematical calculations, some
    hints about the fastest way to program that loop would be also great!
    After refactoring using the new features from java 1.5 (as recommended from
    SUN) I lost performance significantly:
    using a vector:
    public Vector<unit> units;
    The new code (recommended from SUN for Java Tiger for redesign):
    for (unit u: units) u.accumulate();
    runs more than 30% slower than the old code:
    for (int i = 0; i < units.size(); i++) units.elementAt(i).accumulate();
    I expected the opposite.
    Is there any information available that helps?
    The following additional information I got from Mr. Shankar Unni:
    I got some fairly anomalous results comparing ArrayList and Vector: for the
    1.5-style loops, ArrayList was faster then Vector, but for a loop with get()
    calls, Vector was faster. Vector was even faster than that using
    elementAt(), which was a surprise:
    For a million summing iterations over a 100-element array:
    vector elementAt loop took 3446 ms.
    vector get loop took 3796 ms.
    vector iterator loop took 5469 ms.
    arraylist get loop took 4136 ms.
    arraylist iterator loop took 4668 ms.

    If your topic doesn't change, please stay in your original post.

  • Performance problems with SAP GUI 7.10 and BEx 3.5 Patch 400?

    Hi everybody,
    we installed SAP GUI 7.10 and BEx 3.5 Patch 400 and detected hugh performance problems with this version in comparison to the SAP GUI 6.40 and BEx 3.5 or BEx 7.0 Patch 800.
    Does anybody detect the same problems?
    Best regards,
    Ulli

    Most important question when you are talking about performance-issues:
    which OC are you working on and which excel version?
    ciao
    Joke

  • Performance Problems with "For all Entries" and a big internal table

    We have big Performance Problems with following Statement:
    SELECT * FROM zeedmt_zmon INTO TABLE gt_zmon_help
      FOR ALL ENTRIES IN gt_zmon_help
        WHERE
        status = 'IAI200' AND
        logdat IN gs_dat AND
        ztrack = gt_zmon_help-ztrack.
    In the internal table gt_zmon_help are over 1000000 entries.
    Anyone an Idea how to improve the Performance?
    Thank you!

    >
    Matthias Weisensel wrote:
    > We have big Performance Problems with following Statement:
    >
    >  
    SELECT * FROM zeedmt_zmon INTO TABLE gt_zmon_help
    >   FOR ALL ENTRIES IN gt_zmon_help
    >     WHERE
    >     status = 'IAI200' AND
    >     logdat IN gs_dat AND
    >     ztrack = gt_zmon_help-ztrack.
    >
    > In the internal table gt_zmon_help are over 1000000 entries.
    > Anyone an Idea how to improve the Performance?
    >
    > Thank you!
    You can't expect miracles.  With over a million entries in your itab any select is going to take a bit of time. Do you really need all these records in the itab?  How many records is the select bringing back?  I'm assuming that you have got and are using indexes on your ZEEDMT_ZMON table. 
    In this situation, I'd first of all try to think of another way of running the query and restricting the amount of data, but if this were not possible I'd just run it in the background and accept that it is going to take a long time.

  • Performance problems with EP 6 and MS IE

    Hi everybody,
    since a couple of days, we are facing a sever performance problem with our SAP EP 6.0. When I access the system with MS Internet Explorer 6.0, it takes 5-10 minutes after the Login. With Firefox Browser, the performance is ok. Therefore I assume that it must be a problem with the IE settings. Does anybody know a solution?
    Best regards,
       Michael

    There are a few things that this could be.  I've seen the setting "Empty Temporary Internet Files folder when browser is closed" cause a lot of performance problems (This is in the advanced settings in your IE).
    This will cause your cache to be cleared out each time the browser is closed and cause a lot more data to be downloaded each time you login to the system.
    For more analysis I'd recommend putting a tool like HTTPWatch into your IE browser and seeing which requests are using the most time.

  • Performance problems with DFSN, ABE and SMB

    Hello,
    We have identified a problem with DFS-Namespace (DFSN), Access Based Enumeration (ABE) and SMB File Service.
    Currently we have two Windows Server 2008 R2 servers providing the domain-based DFSN in functional level Windows Server 2008 R2 with activated ABE.
    The DFSN servers have the most current hotfixes for DFSN and SMB installed, according to http://support.microsoft.com/kb/968429/en-us and http://support.microsoft.com/kb/2473205/en-us
    We have only one AD-site and don't use DFS-Replication.
    Servers have 2 Intel X5550 4 Core CPUs and 32 GB Ram.
    Network is a LAN.
    Our DFSN looks like this:
    \\contoso.com\home
        Contains 10.000 Links
        Drive mapping on clients to subfolder \\contoso.com\home\username
    \\contoso.com\group
        Contains 2500 Links
        Drive mapping on clients directly to \\contoso.com\group
    On \\contoso.com\group we serve different folders for teams, projects and other groups with different access permissions based on AD groups.
    We have to use ABE, so that users see only accessible Links (folders)
    We encounter sometimes multiple times a day enterprise-wide performance problems for 30 seconds when accessing our Namespaces.
    After six weeks of researching and analyzing we were able to identify the exact problem.
    Administrators create a new DFS-Link in our Namespace \\contoso.com\group with correct permissions using the following command line:
    dfsutil.exe link \\contoso.com\group\project123 \\fileserver1\share\project123
    dfsutil.exe property sd grant \\contoso.com\group\project123 CONTOSO\group-project123:RX protect replace
    This is done a few times a day.
    There is no possibility to create the folder and set the permissions in one step.
    DFSN process on our DFSN-servers create the new link and the corresponding folder in C:\DFSRoots.
    At this time, we have for example 2000+ clients having an active session to the root of the namespace \\contoso.com\group.
    Active session means a Windows Explorer opened to the mapped drive or to any subfolder.
    The file server process (Lanmanserver) sends a change notification (SMB-Protocol) to each client with an active session \\contoso.com\group.
    All the clients which were getting the notification now start to refresh the folder listing of \\contoso.com\group
    This was identified by an network trace on our DFSN-servers and different clients.
    Due to ABE the servers have to compute the folder listing for each request.
    DFS-Service on the servers doen't respond for propably 30 seconds to any additional requests. CPU usage increases significantly over this period and went back to normal afterwards. On our hardware from about 5% to 50%.
    Users can't access all DFS-Namespaces during this time and applications using data from DFS-Namespace stop responding.
    Side effect: Windows reports on clients a slow-link detection for \\contoso.com\home, which can be offline available for users (described here for WAN-connections: http://blogs.technet.com/b/askds/archive/2011/12/14/slow-link-with-windows-7-and-dfs-namespaces.aspx)
    Problem doesn't occure when creating a link in \\contoso.com\home, because users have only a mapping to subfolders.
    Currently, the problem doesn't occure also for \\contoso.com\app, because users usually don't use Windows Explorer accessing this mapping.
    Disabling ABE reduces the DFSN freeze time, but doesn't solve the problem.
    Problem also occurs with Windows Server 2012 R2 as DFSN-server.
    There is a registry key available for clients to avoid the reponse to the change notification (NoRemoteChangeNotify, see http://support.microsoft.com/kb/812669/en-us)
    This might fix the problem with DFSN, but results in other problems for the users. For example, they have to press F5 for refreshing every remote directory on change.
    Is there a possibility to disable the SMB change notification on server side ?
    TIA and regards,
    Ralf Gaudes

    Hi,
    Thanks for posting in Microsoft Technet Forums.
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Regards.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Performance problems with XMLTABLE and XMLQUERY involving relational data

    Hello-
    Is anyone out there using XMLTABLE or XMLQUERY with more than a toy set of data? I am running into serious performance problems tyring to do basic things such as:
    * Combine records in 10 relational tables into a single table of XMLTYPE records using XMLTABLE. This hangs indefinitely for any more than 800 records. Oracle has confirmed that this is a problem and is working on a fix.
    * Combine a single XMLTYPE record with several relational code tables into a single XMLTYPE record using XMLQUERY and ora:view() to insert code descriptions after each code. Performance is 10 seconds for 10 records (terrible) passing a batch of records , or 160 seconds for one record (unacceptable!). How can it take 10 times longer to process 1/10th the number of records? Ironically, the query plan says it will do a full table scan of records for the batch, but an index access for the one record passed to the XMLQUERY.
    I am rapidly losing faith in XML DB, and desparately need some hints on how to work around these performance problems, or at least some assurance that others have been able to get this thing to perform.

    <Note>Long post, sorry.</Note>
    First, thanks for the responses above. I'm impressed with the quality of thought put into them. (Do the forum rules allow me to offer rewards? :) One suggestion in particular made a big performance improvement, and I’m encouraged to hear of good performance in pure XML situations. Unfortunately, I think there is a real performance challenge in two use cases that are pertinent to the XML+relational subject of this post and probably increasingly common as XML DB usage increases:
    •     Converting legacy tabular data into XML records; and
    •     Performing code table lookups for coded values in XML records.
    There are three things I want to accomplish with this post:
    •     Clarify what we are trying to accomplish, which might expose completely different approaches than I have tried
    •     Let you know what I tried so far and the rationale for my approach to help expose flaws in my thinking and share what I have learned
    •     Highlight remaining performance issues in hopes that we can solve them
    What we are trying to accomplish:
    •     Receive a monthly feed of 10,000 XML records (batched together in text files), each containing information about an employee, including elements that repeat for every year of service. We may need to process an annual feed of 1,000,000 XML records in the future.
    •     Receive a one-time feed of 500,000 employee records stored in about 10 relational tables, with a maximum join depth of 2 or 3. This is inherently a relational-to-XML process. One record/second is minimally acceptable, but 10 records/sec would be better.
    •     Consolidate a few records (from different providers) for each employee into a single record. Given the data volume, we need to achieve a minimum rate of 10 records per second. This may be an XML-only process, or XML+relational if code lookups are done during consolidation.
    •     Allow the records to be viewed and edited, with codes resolved into user-friendly descriptions. Since a user is sitting there, code lookups done when a record is viewed (vs. during consolidation) should not take more than 3 seconds total. We have about 20 code tables averaging a few hundred rows each, though one has 450,000 rows.
    As requested earlier, I have included code at the end of this post for example tables and queries that accurately (but simply) replicate our real system.
    Why we did and why:
    •     Stored the source XML records as CLOBS: We did this to preserve the records exactly as they were certified and sent from providers. In addition, we always access the entire XML record as a whole (e.g., when viewing a record or consolidating employee records), so this storage model seemed like a good fit. We can copy them into another format if necessary.
    •     Stored the consolidated XML employee records as “binary XML”. We did this because we almost always access a single, entire record as a whole (for view/edit), but might want to create some summary statistics at some point. Binary XML seemed the best fit.
    •     Used ora:view() for both tabular source records and lookup tables. We are not aware of any alternatives at this time. If it made sense, most code tables could be pre-converted into XML documents, but this seemed risky from a performance standpoint because the lookups use both code and date range constraints (the meaning of codes changes over time).
    •     Stored records as XMLTYPE columns in a table with other key columns on the table, plus an XMLTYPE metadata column. We thought this would facilitate pulling a single record (or a few records for a given employee) quickly. We knew this might be unnecessary given XML indexes and virtual columns, but were not experienced with those and wanted the comfort of traditional keys. We did not used XMLTYPE tables or the XML Repository for documents.
    •     Used XMLTABLE to consolidate XML records by looping over each distinct employee ID in the source batch. We also tried XMLQUERY and it seems to perform about the same. We can achieve 10 to 20 records/second if we do not do any code lookups during consolidation, just meeting our performance requirement, but still much slower than expected.
    •     Used PL/SQL with XMLFOREST to convert tabular source records to XML by looping over distinct employee IDs. We tried this outside PL/SQL both with XMLFOREST and XMLTABLE+ora:view(), but it hangs in both cases for more than 800 records (a known/open issue). We were able to get it to work by using an explicit cursor to loop over distinct employee IDs (rather than processing all records at once within the query). The performance is one record/second, which is minimally acceptable and interferes with other database activity.
    •     Used XMLQUERY plus ora:view() plus XPATH constraints to perform code lookups. When passing a single employee record, the response time ranges from 1 sec to 160 sec depending on the length of the record (i.e., number of years of service). We achieved a 5-fold speedup using an XMLINDEX (thank you Marco!!). The result may be minimally acceptable, but I’m baffled why the index would be needed when processing a single XML record. Other things we tried: joining code tables in the FOR...WHERE clauses, joining code tables using LET with XPATH constraints and LET with WHERE clause constraints, and looking up codes individually via JDBC from the application code at presentation time. All those approaches were slower. Note: the difference I mentioned above in equality/inequality constraint performance was due to data record variations not query plan variations.
    What issues remain?
    We have a minimally acceptable solution from a performance standpoint with one very awkward PL/SQL workaround. The performance of a mixed XML+relational data query is still marginal IMHO, until we properly utilize available optimizations, fix known problems, and perhaps get some new query optimizations. On the last point, I think the query plan for tabular lookups of codes in XML records is falling short right now. I’m reminded of data warehousing in the days before hash joins and star join optimization. I would be happy to be wrong, and just as happy for viable workarounds if I am right!
    Here are the details on our code lookup challenge. Additional suggestions would be greatly appreciated. I’ll try to post more detail on the legacy table conversion challenge later.
    -- The main record table:
    create table RECORDS (
    SSN varchar2(20),
    XMLREC sys.xmltype
    xmltype column XMLREC store as binary xml;
    create index records_ssn on records(ssn);
    -- A dozen code tables represented by one like this:
    create table CODES (
    CODE varchar2(4),
    DESCRIPTION varchar2(500)
    create index codes_code on codes(code);
    -- Some XML records with coded values (the real records are much more complex of course):
    -- I think this took about a minute or two
    DECLARE
    ssn varchar2(20);
    xmlrec xmltype;
    i integer;
    BEGIN
    xmlrec := xmltype('<?xml version="1.0"?>
    <Root>
    <Id>123456789</Id>
    <Element>
    <Subelement1><Code>11</Code></Subelement1>
    <Subelement2><Code>21</Code></Subelement2>
    <Subelement3><Code>31</Code></Subelement3>
    </Element>
    <Element>
    <Subelement1><Code>11</Code></Subelement1>
    <Subelement2><Code>21</Code></Subelement2>
    <Subelement3><Code>31</Code></Subelement3>
    </Element>
    <Element>
    <Subelement1><Code>11</Code></Subelement1>
    <Subelement2><Code>21</Code></Subelement2>
    <Subelement3><Code>31</Code></Subelement3>
    </Element>
    </Root>
    for i IN 1..100000 loop
    insert into records(ssn, xmlrec) values (i, xmlrec);
    end loop;
    commit;
    END;
    -- Some code data like this (ignoring date ranges on codes):
    DECLARE
    description varchar2(100);
    i integer;
    BEGIN
    description := 'This is the code description ';
    for i IN 1..3000 loop
    insert into codes(code, description) values (to_char(i), description);
    end loop;
    commit;
    end;
    -- Retrieve one record while performing code lookups. Takes about 5-6 seconds...pretty slow.
    -- Each additional lookup (times 3 repeating elements in the data) adds about 1 second.
    -- A typical real record has 5 Elements and 20 Subelements, meaning more than 20 seconds to display the record
    -- Note we are accessing a single XML record based on SSN
    -- Note also we are reusing the one test code table multiple times for convenience of this test
    select xmlquery('
    for $r in Root
    return
    <Root>
    <Id>123456789</Id>
    {for $e in $r/Element
        return
        <Element>
          <Subelement1>
            {$e/Subelement1/Code}
    <Description>
    {ora:view("disaac","codes")/ROW[CODE=$e/Subelement1/Code]/DESCRIPTION/text() }
    </Description>
    </Subelement1>
    <Subelement2>
    {$e/Subelement2/Code}
    <Description>
    {ora:view("disaac","codes")/ROW[CODE=$e/Subelement2/Code]/DESCRIPTION/text()}
    </Description>
    </Subelement2>
    <Subelement3>
    {$e/Subelement3/Code}
    <Description>
    {ora:view("disaac","codes")/ROW[CODE=$e/Subelement3/Code]/DESCRIPTION/text() }
    </Description>
    </Subelement3>
    </Element>
    </Root>
    ' passing xmlrec returning content)
    from records
    where ssn = '10000';
    The plan shows the nested loop access that slows things down.
    By contrast, a functionally-similar SQL query on relational data will use a hash join and perform 10x to 100x faster, even for a single record. There seems to be no way for the optimizer to see the regularity in the XML structure and perform a corresponding optimization in joining the code tables. Not sure if registering a schema would help. Using structured storage probably would. But should that be necessary given we’re working with a single record?
    Operation Object
    |SELECT STATEMENT ()
    | SORT (AGGREGATE)
    | NESTED LOOPS (SEMI)
    | TABLE ACCESS (FULL) CODES
    | XPATH EVALUATION ()
    | SORT (AGGREGATE)
    | NESTED LOOPS (SEMI)
    | TABLE ACCESS (FULL) CODES
    | XPATH EVALUATION ()
    | SORT (AGGREGATE)
    | NESTED LOOPS (SEMI)
    | TABLE ACCESS (FULL) CODES
    | XPATH EVALUATION ()
    | SORT (AGGREGATE)
    | XPATH EVALUATION ()
    | SORT (AGGREGATE)
    | XPATH EVALUATION ()
    | TABLE ACCESS (BY INDEX ROWID) RECORDS
    | INDEX (RANGE SCAN) RECORDS_SSN
    With an xmlindex, the same query above runs in about 1 second, so is about 5x faster (0.2 sec/lookup), which is almost good enough. Is this the answer? Or is there a better way? I’m not sure why the optimizer wants to scan the code tables and index into the (one) XML record, rather than the other way around, but maybe that makes sense if the optimizer wants to use the same general plan as when the WHERE clause constraint is relaxed to multiple records.
    -- Add an xmlindex. Takes about 2.5 minutes
    create index records_record_xml ON records(xmlrec)
    indextype IS xdb.xmlindex;
    Operation Object
    |SELECT STATEMENT ()
    | SORT (GROUP BY)
    | FILTER ()
    | NESTED LOOPS ()
    | FAST DUAL ()
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | SORT (AGGREGATE)
    | FILTER ()
    | TABLE ACCESS (FULL) CODES
    | FILTER ()
    | NESTED LOOPS ()
    | FAST DUAL ()
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | SORT (GROUP BY)
    | FILTER ()
    | NESTED LOOPS ()
    | FAST DUAL ()
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | SORT (AGGREGATE)
    | FILTER ()
    | TABLE ACCESS (FULL) CODES
    | FILTER ()
    | NESTED LOOPS ()
    | FAST DUAL ()
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | SORT (GROUP BY)
    | FILTER ()
    | NESTED LOOPS ()
    | FAST DUAL ()
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | SORT (AGGREGATE)
    | FILTER ()
    | TABLE ACCESS (FULL) CODES
    | FILTER ()
    | NESTED LOOPS ()
    | FAST DUAL ()
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | SORT (AGGREGATE)
    | FILTER ()
    | NESTED LOOPS ()
    | FAST DUAL ()
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | SORT (AGGREGATE)
    | TABLE ACCESS (BY INDEX ROWID) SYS113473_RECORDS_R_PATH_TABLE
    | INDEX (RANGE SCAN) SYS113473_RECORDS_R_PATHID_IX
    | TABLE ACCESS (BY INDEX ROWID) RECORDS
    | INDEX (RANGE SCAN) RECORDS_SSN
    Am I on the right path, or am I totally using the wrong approach? I thought about using XSLT but was unsure how to reference the code tables.
    I’ve done the best I can constraining the main record to a single row passed to the XMLQUERY. Given Mark’s post (thanks!) should I be joining and constraining the code tables in the SQL WHERE clause too? That’s going to make the query much more complicated, but right now we’re more concerned about performance than complexity.

Maybe you are looking for

  • Adapter micro HDMI to VGA for Nokia Lumia 2520

    could someone tell me which adapter micro HDMI to VGA is suitable for Nokia Lumia 2520 please?

  • Adobe Acrobat no longer works on my Apple 10.5.8 after upgrading latest patch?

    After my Apple 10.5.8 OS automatically downloaded the latest Adobe Acrobat the other day, (after I ok'd it), it no longer works at all, can't open any pdf's at all. It says the following: The currently selected language resources are not supported by

  • Eps C++ parser

    Hi all, I am not sure if this question belongs here, but I guess this forum should be the most appropriate. I am working with eps (encapsulated postscript) files and was looking for a C++ parser which could parse such files. I tried looking on the we

  • MS5182 Machine will not reset.

    Hi I know this is an old board but a friend has asked me to look at it for him. I have done a clean install of Win Me. At this point the reset facility works fine. Somewhere between fully updating ME from Microsoft.com and installing office 2000 all

  • Published RoboHelp not displaying edited content.

    Today I opened an existing .xpj file and added two topics. I saved all changes. However, once I published the .xpj using WebHelp_Pro (Primary Layout) the HTML file and viewer does not display the new topics. Also, although i have edited the .xpj file