No of physical reads of buffers from disk on PROD and Clone has huge differ

Please help !
I am having a problem interpreting a tkprof report.
I am executing the same statement below in PROD and Clone of PROD.
What I do not understand why the tkprof report shows huge difference in disk reads for same executions from PROD and Clone of PROD. I.e. first execution disk reads = 757187 , second = 6.
I expected to see Similar disk reads in the second execution also.The data it fetches is same in both the Instances.
Statment
SELECT NVL(SUM(RG_OTH.DEBIT),0),NVL(SUM(RG_OTH.CREDIT),0)
FROM
JA_IN_PLA PLA,JAI_RG_OTHERS RG_OTH,HR_ALL_ORGANIZATION_UNITS HOU,
HR_LOCATIONS LOC,JA_IN_HR_ORGANIZATION_UNITS HR_ORG WHERE 1 = 1 AND
PLA.ORGANIZATION_ID = :b1 AND TRUNC(PLA.CREATION_DATE) >= :b2 AND
TRUNC(PLA.CREATION_DATE) <= :b3 AND HOU.ORGANIZATION_ID =
PLA.ORGANIZATION_ID AND LOC.LOCATION_ID = PLA.LOCATION_ID AND
HR_ORG.ORGANIZATION_ID = PLA.ORGANIZATION_ID AND HR_ORG.LOCATION_ID =
PLA.LOCATION_ID AND TRANSACTION_ID = 19 AND INVENTORY_ITEM_ID != 0 AND
NVL(ROUNDING_ID,1) != -1 AND RG_OTH.SOURCE_REGISTER_ID = PLA.REGISTER_ID
AND RG_OTH.SOURCE_REGISTER = 'PLA' AND RG_OTH.TAX_TYPE IN (
'EXCISE_EDUCATION_CESS' )
Tkproff from PROD.
call count cpu elapsed disk query current rows
Parse 1 0.01 0.01 0 0 0 0
Execute 1 0.04 0.03 0 0 0 0
Fetch 1 973.41 1724.95 757187 789442 0 1
total 3 973.46 1725.01 757187 789442 0 1
Tkproff from CLONE of PROD.
call count cpu elapsed disk query current rows
Parse 1 0.06 0.05 1 789 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 0.73 0.72 6 30594 0 1
total 3 0.79 0.78 7 31383 0 1

wins wrote:
SELECT NVL(SUM(RG_OTH.DEBIT),0),NVL(SUM(RG_OTH.CREDIT),0)  
FROM
JA_IN_PLA PLA,JAI_RG_OTHERS RG_OTH,HR_ALL_ORGANIZATION_UNITS HOU,
HR_LOCATIONS LOC,JA_IN_HR_ORGANIZATION_UNITS HR_ORG  WHERE 1 = 1  AND
PLA.ORGANIZATION_ID = :b1  AND TRUNC(PLA.CREATION_DATE) >= :b2  AND
TRUNC(PLA.CREATION_DATE) <= :b3  AND HOU.ORGANIZATION_ID =
PLA.ORGANIZATION_ID  AND LOC.LOCATION_ID = PLA.LOCATION_ID  AND
HR_ORG.ORGANIZATION_ID = PLA.ORGANIZATION_ID  AND HR_ORG.LOCATION_ID =
PLA.LOCATION_ID  AND TRANSACTION_ID = 19  AND INVENTORY_ITEM_ID != 0  AND
NVL(ROUNDING_ID,1) != -1  AND RG_OTH.SOURCE_REGISTER_ID = PLA.REGISTER_ID 
AND RG_OTH.SOURCE_REGISTER = 'PLA'  AND RG_OTH.TAX_TYPE IN (
'EXCISE_EDUCATION_CESS'  )
Tkproff from PROD.
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.01       0.01          0          0          0           0
Execute      1      0.04       0.03          0          0          0           0
Fetch        1    973.41    1724.95     757187     789442          0           1
total        3    973.46    1725.01     757187     789442          0           1
Tkproff from CLONE of PROD.
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.06       0.05          1        789          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        1      0.73       0.72          6      30594          0           1
total        3      0.79       0.78          7      31383          0           1
As others have pointed out, this looks like a change in execution plan. At a guess, the PROD database is doing a tablescan somewhere (physical reads is approximately equal to logical reads is a pointer).
There are many reasons why this could happen, continuing with the guesswork - we note that the statement was re-optimised (hard parsed) in the clone, but used an existing cursor in production (logical I/O = 0 in prod, 789 in clone). So the plan you got in the clone was the one that Oracle thought best for the inputs you had supplied. The plan in prod could have been produced as the response to a completely different set of input; since you have two bind variables applied to a range based predicated and one bind variable with equality it's possible that you have a histogram that makes a difference on the equality column, alternatively the range of dates used to generate the original plan was very different from the range used in the test.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Author: <b><em>Oracle Core</em></b>

Similar Messages

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • HT4623 I've just upgraded my iPhone from ios3 to ios6 and it has taken my phone back in time. My most recent photos and messages are dated from a year ago. My music is fine, just messages and photos are gone. HELP?

    I've just upgraded my iPhone from ios3 to ios6 and it has taken my phone back in time. My most recent photos and messages are dated from a year ago. My music is fine, just messages and photos are gone. HELP?

    Restore the device using the most recent backup.
    If you have not backed up the device recently, then there is nothing to restore.

  • My iPad had a problem and I had to get another one. I am tring to restore all my data from my iCloud account and it has taken 19 hours so far. Am I doing something wrong?

    My iPad Air had to be replaced i went to the apple store to get a new one. we started the download at the store and I returned home to finish downloading from my iCloud account and it has taken 19 hours so far. Am I doing something wrong?

    Hey Calpalm99,
    Thanks for the question. I understand that you are experiencing issues restoring an iCloud backup. Don't worry, it doesn't sound like you are doing anything wrong, rather it may be that the connection was interrupted after you left Wi-Fi and returned home. To troubleshoot, you can try restoring your backup once more or see the information in this resource:
    If you need help restoring an iCloud backup
    http://support.apple.com/kb/TS4036
    Thanks,
    Matt M.

  • Read sound file from disk in Java

    Write a simple application that reads a sound file from disk (use a Clip). Play the sound backwards by arranging the byte arrays/frames in the reverse order.
    Please I need an explanation of every step.
    Get some Duke Dollars for your help.

    Hi,
    When execute this code, I see this: "[Ljava.io.File;@111f71".   
    How I can see the name of the File, and How I can run a program with one by one from the files reader in a parameter ???
      Thank's.
       Hervey P.                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Having trouble reading specific lines from a text file and displaying them in a listbox

    I am trying to read specific lines from all of the text files in a folder that are reports. When I run the application I get the information from the first text file and then it returns this error: "A first chance exception of type 'System.ArgumentOutOfRangeException'
    occurred in mscorlib.dll"
    Below is the code from that form. 
    Option Strict On
    Option Infer Off
    Option Explicit On
    Public Class frmInventoryReport
    Public Function ReadLine(ByVal lineNumber As Integer, ByVal lines As List(Of String)) As String
    Dim intTemp As Integer
    intTemp = lineNumber
    Return lines(lineNumber - 1)
    lineNumber = intTemp
    End Function
    Public Function FileMatches(ByVal folderPath As String, ByVal filePattern As String, ByVal phrase As String) As Boolean
    For Each fileName As String In IO.Directory.GetFiles(folderPath, filePattern)
    If fileName.ToLower().Contains(phrase.ToLower()) Then
    Return True
    End If
    Next
    Return False
    End Function
    Private Sub frmInventoryReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim intcase As Integer = 1
    Dim strTemp, strlist, strFile As String
    Dim blnCheck As Boolean = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Do While blnCheck = True
    strFile = "Report Q" & intcase.ToString & ".txt"
    Dim objReader As New System.IO.StreamReader("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\" & strFile)
    Dim allLines As List(Of String) = New List(Of String)
    Do While objReader.Peek <> -1
    allLines.Add(objReader.ReadLine())
    Loop
    objReader.Close()
    strlist = ReadLine(1, allLines) & "" & ReadLine(23, allLines)
    lstInventory.Items.Add(strlist)
    intcase += 1
    strTemp = intcase.ToString
    strFile = "Report Q" & intcase.ToString & ".txt"
    blnCheck = FileMatches("E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\", "*.txt", intcase.ToString)
    Loop
    End Sub
    End Class
    Sorry I'm just beginning coding and I'm still a noob. Any help is appreciated. Thank you!

    Ok, so if I'm following this correctly you should be able to just loop through all of the files in that folder whose file name matches the pattern and then read the first 22 lines, recording only the first and the last.
    Exactly how you store the animal data probably depends on how you are going to display it and what else you are going to do with it.  Is there anything other than name and cage number that should be associated with each animal?
    You might want to make a dataset with a datatable to describe the animal, or you might write a class, or you might just use something generic like a Tuple.  Here's a simple class example:
    Public Class Animal
    Public Property Name As String
    Public Property Cage As String
    Public Overrides Function ToString() As String
    Return String.Format("{0} - {1}", Name, Cage)
    End Function
    End Class
    With that you can use a routine like the following to loop through all of the files and read each one:
    Dim animals As New List(Of Animal)
    Dim folderPath As String = "E:\Furry Friends Animal Shelter Solution\Furry Friends Animal Shelter\"
    For Each filePath As String In System.IO.Directory.GetFiles(folderPath, "Report Q?.txt")
    Using reader As New System.IO.StreamReader(filePath)
    Dim lineIndex As Integer = 0
    Dim currentAnimal As New Animal
    While Not reader.EndOfStream
    Dim line As String = reader.ReadLine
    If lineIndex = 0 Then
    currentAnimal.Name = line
    ElseIf lineIndex = 22 Then
    currentAnimal.Cage = line
    Exit While
    End If
    lineIndex += 1
    End While
    animals.Add(currentAnimal)
    End Using
    Next
    'do something to display the animals list
    Then you might bind the animals list to a ListBox, or loop through the list and populate a ListView.  If you decided to fill a datatable instead of making Animal instances, then you might bind the resulting table to a DataGridView.
    There are lots of options depending on what you want and what all you need to do.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • Read image data from SQL Server database and display it in a JSP web page

    Hi experts,
    I am doing a project in which I have to upload images to the database via JSP/servlets. I am able to do this.
    Now I want users to view and dowload these images which are stored in the database.
    Please help me of how can I read the images from the database and display it on jsp webpage and also can be downloaded by users via jsp pages on client side.
    Please help!

    Hi you may go through the below post to find what could be a better way to do that.
    http://forum.java.sun.com/thread.jspa?threadID=5163829
    REGARDS,
    RaHuL

  • How to read time stamps from a spreadshee​t and calculate the difference between consecutiv​e time stamps?

    Hi,
    I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data:
    Time Stamp                    Power Output
    11:00:00 AM                       3kW
    11:00:02 AM                       2.9kW
    11:00:04 AM                       3.2kW
    11:00:06 AM                       3.1kW
    The above data doesn't make any sense, but it is just for the purpose of this question.
    So, I have to read 11:00:00 AM and 3kW initially - 3kW is the initial request that

    Hello
    you can simple subtract one time from the other one and so you get the difference. -> Example
    Mike
    Attachments:
    Unbenannt 2.vi ‏8 KB

  • Can see shared CD drives on MBA, but cannot read any data from disks

    Puzzling one here.
    Have a MBA and am trying to use the shared drives on either a Windows XP computer, or MacBookPro notebook. Both computers are on the same wireless network, and both computers have DVD/CD sharing enabled.
    In the RemoteDisk shortcut on the MBA, I can see both computers and their shared drives, and I can even see the title of the disks that are in the drives, however, I cannot see any of the data on the disks. It tells me 0MB at the bottom of the window.
    The MBA has all updates installed, and I even tried to manually install the RemoteDisk/Sharing update from Apple.
    I found this post, and tried the commands in Terminal, but that did not help: http://jasonevangelho.com/2008/11/02/how-to-really-enable-remote-disc-dvd-drive- sharing-non-air-macbook/
    Any idea's?

    Oh yeah, I forgot to say that the wireless router is a Time Capsule.

  • Reading big JTable from disk one page at a time

    Hi,
    I'm trying to display a JTable in its JScrollPane
    for a large amount of data (say 40'000 records).
    Scrolling is quite smart, since it does a relatively
    good job when the user drags the knob, e.g. in order
    to reach the bottom. However, it leaves something to
    be desired. Any pointer to some example implementation?
    In particular, the table model should know how many
    records are displayed at a time, and I found no easy
    way for determining it. (I didn't make the table
    editable yet, but the current page is needed whenever
    the table is repainted, so it better be cashed.)
    And, in some cases it would be better to not update
    the view and just display a tooltip while the knob
    is being dragged. That would cause much less reading.
    In general, I need to adjust the cashing strategy
    in order to accomplish what JScrollPane is doing.
    Should I subclass it? Or should I subclass JTable?
    TIA
    Ale

    In particular, the table model should know how many
    records are displayed at a time, and I found no easy
    way for determining it. (I didn't make the table
    editable yet, but the current page is needed whenever
    the table is repainted, so it better be cashed.)There are at least two ways of finding the beginning row/column and ending row/column of the viewport. One of which is by using the JScrollBar getValue() and the other is to use the JTable getVisibleRect() method -- with either method, you will need to convert it to Point and use the JTable rowAtPoint() and columnAtPoint() to translate the point to row/column index.
    And, in some cases it would be better to not update
    the view and just display a tooltip while the knob
    is being dragged. That would cause much less reading.The best way to do this is to extend the BasicScrollPaneUI and implement your own ChangeListeners for the vertical and horizontal scroll bars as well as the viewport.
    Good Luck!
    ;o)
    V.V.

  • "Example on reading combined signals from a serial port and separating them for display purposes". I am a beginner in Labview and would appreciate if anyone help with that

    I am working on a wireless vital sign monitor. I have 3 signals; heart rate and temperature. I filter and amplify the signals before converting them into digital form. I then pass them via MAX232 before passing them to RS232 serial cable.
    I am therefore working on a program to receive the combined signal and separate them.
    I have come across serial read and write examples on ni.com but am looking for one where I can actually separate combined signals and display them separately.

    Reading the serial port will give you a string. How you divide the channels depends on how the data was formatted before it was sent over the serial channel.
    If you are designing the instrument, as it seems from your query, then you can set up any form you wish. If your data is always floating point numeric, you could use space or tab characters to separate data words. You could use and XML format. If the instrument is provided by a vendor, contact them for the protocol.
    If tabs are used between words and returns between sets of readings, the resutlant string can be interpretted by the Spreadsheet String to Array function in LV.
    Things to avoid are characters often used by serial communications systems as control characters. Carraige returns are
    often used as command terminators by serial protocols, but may also be used by the port.
    Lynn

  • Reading special characters from a flat file and inserting into DB

    I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this?
    If i try to do the insert directly it works. It seems like the error occurs when reading this data into a variable
    thanks for the help
    Lalit Bhatia

    lalit, this is probably an character set problem, the default on Database creation tends to be 7bit Ascii which does not support special characters, it's been a while since I set up a db in this way, but you need to change settings in oracle.ini. The db will need to be restarted for this. Also, to check current settings try:
    select * from NLS_DATABASE_PARAMETERS
    You want an 8bit, unicode or multibyte character set. Sorry I cannot remember moer off the top of my head, try searching on NLS or character set

  • How to read User ID from the request Form and pre populating in the AD User process form before provisioning

    I am trying to read the user Id from the submitted AD User request form( Catalogue AD User form. I need User Id,firstname and lastname inorder to prepopulate the common name as in this format - lastname,firstname (userid)  for the user to be provisioned in Active Directory.
    So after filling the AD User request form with User Id and Organization and submitting the request, I am trying to
    prepopulate the common name in the process form before the provisioning.
    The prepopulate adopter for the common name is configured to read the firstname, lastname and userid. firstname and
    lastname variables are mapped to User definition and user Id is mapped to Process Data. In this setup I am not getting the
    User Id value from process data, it is empty.
    Is this a bug with OIM 11g R2 or I need to do it differently in order to read the user Id that user has entered in the
    request form for populating the common name?
    Thanks

    Ghulam Yassen wrote:
    How to get USER_ID and IP_AddressWhy exactly do you need this data and what do you plan to do with it?
    The data is not reliable and trustworthy. IP addresses can easily be spoofed (a few seconds if you know what to do and how to do it). Also, IP addresses are not static. Users also do not use the same network device to access the database - different devices will have different IP addresses.
    The o/s user on the client is supplied by the client driver. This can also be spoofed.
    The user can also use a virtualised device - which means that recording the IP and o/s user seen from the server side, is pretty much useless and meaningless.
    So if this data is intended to be used for auditing for example - it would be pretty suspect data to use for that purpose.

  • How a menu item can read the parameter from a Form module and ....

    I would like to specify the menu item to go_block from a Form module, or even open window, reading parameters.
    But there is an Error says "CANNOT CALL LINK-IN FORM from Form builder"
    How to make it works??
    Plesae HELP~~~~~

    Dear Friend,
    There is one Procedure by which you can get the value of the paramtere passed to the form.. this procedure is NAME_IN...
    Hope this will solve your problem..
    Ok
    Email me when your problem is solved...
    My email is "[email protected]"
    Regards
    Shan

  • MBP won't start from Disk Warrior CD and now won't restart at all.

    I tried starting my MBP from DW CD and I keep getting screen with Terminal type font and a message that says I need to restart my computer. When I restart I get the same screen over and over. (Now typing on iPhone so bare with me!)

    What you will need to do is restore your OS.
    http://support.apple.com/kb/PH11273
    Follow the instructions on this page. If you need someone to help you walk through it just let me know. This process will bypass your computer trying to boot on the Operating System and will boot on a recovery partition. And from here you can try to see whats going on. You might try and go through disk utility and verify disk and see if it can locate the problem. If there is click repair and hopefully it will do the trick.
    Hope this helps!
    -Steven

Maybe you are looking for