What percentage of sorting is done in Memory?

DB Version:10g Release 2
When you have a query with a large number of columns in the ORDER BY clause or a query without ORDER BY clause but with a larger number of columns in the SELECT list, the PGA_AGGREGATE_TARGET might not be sufficient to do this job. So, What % of PGA is set aside by Oracle for sorting? When this reserved % is reached in Memory(PGA_AGGREGATE_TARGET), temp tablespace is used,ie Disk sort. Right?

J.Kiechle wrote:
DB Version:10g Release 2
When you have a query with a large number of columns in the ORDER BY clause or a query without ORDER BY clause but with a larger number of columns in the SELECT list, the PGA_AGGREGATE_TARGET might not be sufficient to do this job. So, What % of PGA is set aside by Oracle for sorting? When this reserved % is reached in Memory(PGA_AGGREGATE_TARGET), temp tablespace is used,ie Disk sort. Right?It's probably a bit different and a bit more complex, but in a nutshell the PGA_AGGREGATE_TARGET defines the upper limit that Oracle should use for the PGA areas of the processes used to run the database.
There is a non-tunable part that contributes to the PGA_AGGREGATE_TARGET, that can be significantly influenced e.g. by large PL/SQL collections or Java programs. The memory consumed by these can not be controlled by Oracle and therefore can't be reduced, but will be used in the overall calculation.
The tunable part consists of the SQL workareas that are used to sort, group or hash data as part of the SQL execution.
The value of PGA_AGGREGATE_TARGET determines several internal parameters, among them are pgamax_size, smmmax_size and smmpx_max_size. These internal parameters control the maximum amount of memory that can by used a single process (_pga_max_size), a serial operation resp. "workarea" (_smm_max_size) and the maximum memory available for the operation of a parallel slave in a parallel operation (_smm_px_max_size).
There is a significant difference between 10.2 and previous Oracle releases regarding these internal parameters:
In pre-10.2 databases pgamax_size defaults to 200M, and smmmax_size is the least of 5% of PGA_AGGREGATE_TARGET and 50% of pgamax_size, and 100M (if you set pgamax_size larger than the default value). The smmpx_max_size is 30% of PGA_AGGREGATE_TARGET and is divided by the parallel degree of the parallel operation to determine the upper limit of a workarea size of a single parallel slave together with smmmax_size.
In 10.2 the upper limits are driven by the smmmax_size which is derived from PGA_AGGREGATE_TARGET and can be larger than 100M if you have a PGA_AGGREGATE_TARGET greater than 1GB. The pgamax_size is then two times smmmax_size.
So in pre-10.2 databases the default maximum size of a single sort is 100M, provided you've set PGA_AGGREGATE_TARGET set to 2GB or greater, but a single process - that could have multiple workareas or sorts simultaneously - is not allowed to allocate more than 200MB in total.
In 10.2 and later you can have more than 100M for a single sort if you set your PGA_AGGREGATE_TARGET larger than 1GB, and a process can consume more than 200M in that case, too.
For more information about these parameters, see e.g. these two interesting notes:
http://christianbilien.wordpress.com/2007/05/01/two-useful-hidden-parameters-smmmax_size-and-pgamax-size/
http://www.jlcomp.demon.co.uk/untested.html
The amount of memory that remains after subtracting the non-tunable memory allocated from the PGA_AGGREGATE_TARGET and the number and size of concurrent tunable workareas determine the amount of memory available for newly established workareas, so that Oracle tries to do its best to allocate the available memory to all current workareas while at the same time attempts to stay below the PGA_AGGREGATE_TARGET. Obviously if many workareas are active concurrently the amount of memory available for each workarea will be less than the upper limits outlined above, down to a lower limit which is defined by the internal parameter smm_min_size (the greatest of 128k and 0.1% of PGA_AGGREGATE_TARGET).
Given these constraints it is possible that Oracle consumes more than the PGA_AGGREGATE_TARGET, eg. if the non-tunable part already takes a significant part of the PGA_AGGREGATE_TARGET. You can see this e.g. in V$PGASTAT if the "over allocation count" statistic value is > 0.
The cost based optimizer also uses the information derived from PGA_AGGREGATE_TARGET to calculate the cost of a sort resp. to estimate whether a sort will be in-memory or has to spill to disk.
There are various views available that allow you to monitor the workarea information, among them are V$PGASTAT for an overall information regarding the PGA consumption, V$PGA_TARGET_ADVICE, V$PGA_TARGET_ADVICE_HISTOGRAM and V$SQL_WORKAREA_HISTOGRAM, V$SQL_WORKAREA_ACTIVE and V$SQL_WORKAREA for monitoring individual workareas.
Regards,
Randolf
Oracle related stuff blog:
http://oracle-randolf.blogspot.com/
SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/

Similar Messages

  • What percentage of users have the Flex 4 framework SWZ cached in their Flash Player?

    I am trying to make the case that using Flex 4 with RSLs is more sensible than developing pure AS3 applications with no Flex or Spark at all. In the former case, file sizes are comparable to the latter, save for about 2 MB worth of RSLs. However, it seems logical that the vast majority of users will already have these assets cached.
    So I have three questions:
    Are there any statistics on what percentage of users have these SWZ files cached already, and therefore won't need to download them at all?
    Is there any way of determining, in my client-side code, when a user loads the file from the FP cache, as opposed to downloading it from my server?
    Is there a performance difference, in terms of total load time, for loading a cached SWZ file, as opposed to simply embedding the framework and not using RSLs at all? Disregard bandwidth and downloading times.
    I have heard that Adobe hasn't released any official statistics, but I'm wondering if anyone has done their own testing with server logging.

    I don't know of any statistics.  It might also depend on the demographics of
    your users.
    There is no way to determine for sure where the SWZ came from, but you could
    probably guess by looking at getTimer() somewhere in your code.
    Ignoring bandwidth and download, the SWZ has very little overhead, but it is
    there.

  • What types of sort performed by sort method of Array class ?

    I use normal bubble sort and method Array.sort() to sort some given data of an Array and then count the time.But Array.sort() method takes more time then normal bubble sort.
    Can anybody tell me what types of sort performed by sort method of Array class?

    I'm pretty sure that in eariler versions (1.2, 1.3
    maybe?) List.sort's docs said it used quicksort. Or I
    might be on crack.You are actually both correct, and wrong :)
    From the documentation of the sort methods hasn't changed in 1.2 -> 1.4 (as far as I can notice), and the documentation for sort(Object[]) says (taken from JDK 1.2 docs):
    "This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort.
    The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n*log(n) performance, and can approach linear performance on nearly sorted lists."
    So, how could you be correct? The documentation for e.g. sort(int[]) (and all other primities) says:
    "Sorts the specified array of ints into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance."
    Your memory serves you well :)
    /Kaj

  • What's the recommended setting for "Process memory usage" ("process virtual" in UI) for a 64-bit host on a 64-bit OS?

    Hi gurus
    In resource based throttling, what's the recommended setting for "Process memory usage" ("process virtual" in the resource based throttling tab of the UI) for a 64-bit host
    on a 64-bit Windows OS?
    According to MS (http://msdn.microsoft.com/en-us/library/ee308808(v=bts.10).aspx):
    "By default, the
    Process memory usage throttling threshold is set to 25. If this value is exceeded and the BizTalk process memory usage is more than 300 MB, a throttling condition may occur. On a 32-bit
    server, you can increase the Process memory usage value to 50. On a 64-bit server, you can increase this value to 100. This allows for more memory consumption by the BizTalk process before throttling
    occurs."
    Does this mean that 100 is the recommended setting for a 64-bit host on a 64-bit Windows?
    Thanks
    Michael Brandt Lassen

    Hi Michael,
    Recommended setting is the default setting which is 25 .dot.
    If your situation is abnormal and you see message delivery throttling state to “4” when the following performance counters are high or if you expect any of you integration
    process could have impact on following counters, then you can consider the suggestion by Microsoft. Don’t change the default setting.
    High process memory
    Process memory usage (MB)
    Process memory usage threshold (MB)
    You can see these counters under “BizTalk:MessageAgent”
    You can gauge these performance counter and its maximum values if have done any regression/performance testing in your test servers. If you have seen these counters having
    high values and causing throttling, then you can update the Process memory usage.
    Or unexpectedly you’re process high throughput messages in production which is causing these counters to go high and cause throttling, then up can update the Process memory
    usage.
    The above two cases where I know my expected process usage (by doing performance testing) or suddenly my production server processing has gone high due to unexpected business
    hike (or any reasons) which caused throttling, then do changes to default throttling setting.
    Just changing the default setting without actual reason could have adverse effect where you end up allocating 
    more processing capacities but the actual message processing message usage ever is low means you end up investing in underutilised resources.
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • When I click on 2014 month view in calendar iPhone 5 s stucks, lagging. What is the problem I don't know????

    When I click on 2014 month view in calendar iPhone 5 s stucks, lagging. What is the problem I don't know????

    Should read 'When I '''clicked''' on your update this a.m......

  • Confirmation of PM order, what FI posting will be done in SAP

    Dear Gurus,
    On final confirmation of PM order, what FI posting will be
    done in SAP ?
    Regards

    Hi Entry Will be
    Stock of FG Accunt debit
      to COGP Account
    Mann

  • HT203175 I tried to update my Itunes to the news version and now it will not open it says it was installed incorrectly I need to know what to do so I don't lose all my music

    I tried to update my Itunes to the news version and now it will not open it says it was installed incorrectly I need to know what to do so I don't lose all my music

    try with this one
    uninstall all the apple application S/w like Quicktime, Bonjour,
    apple Device Support, Apple Auto update, Itunes etc from your pc,
    Reboot it
    Now download a fresh itunes from apple and try installing
    Reboot it
    If you are having Problem in uninstalling any of the apple application
    try 'revo uninstaller' and uninstall all the apple applications
    mentioned above

  • What testing has to be done as a BW tester in R/3 Implementation Project

    What testing has to be done as a BW tester while Implementing R/3?
    Points to remember:
    1.Migration not completed.
    2.How to create data manually.
    3.Creating data manually means whether it is in R/3 or in flat files (excel).
    4.How to write test cases for BW testing as a part of testing team.

    Hello
    If its just a descriptions. Then just full Text load for 0Cost_center should be good enough to show them in the BW Reports
    Thanks

  • What percentage of charge should an iPad mini have straight out of the box?

    What percentage of charge should an iPad mini have straight out of the box?

    enter the serial # here and it will tell you the year and month of production:
    http://www.powerbookmedic.com/identify-mac-serial.php

  • Web Dynpro Java timesheet to Web Dynpro ABAP timesheet  what changes needs to be done from EP side

    Hi All,
    We are moving Web Dynpro Java timesheet to Web Dynpro ABAP timesheet.
    what changes needs to be done from EP side?
    I have made Web Dynpro ABAP iView calling Web Dynpro ABAP timesheet and linked it with page.
    But It is showing an error 'Web Dynpro Application CATDATARECORD does not exist'.
    Please suggest what other changes needs to be done.

    Hi Anurag,
    I have added new Web Dynpro ABAP iView to the same page in which Web Dynpro JAVA iview was added and made ABAP iview visible.
    And this page is already assigned to role.
    How should I link this ABAP iview so that it get replace by the Web Dynpro JAVA iview.
    And the  application name (CATDATARECORD) is correct and Web Dynpro JAVA is using the same application.
    But now we want new time timesheet for that what changes needs to be done?
    Please suggest.

  • What will happen if I don't use apple's hdd?

    My HDD is passed away.
    I'm using Macbook Unibody(A1342) and I will replace the HDD.
    I heard that Apple's HDD has a temperature sensor.
    So that If I don't use that, it will be a problem, as I heard.
    What will happen if I don't use the Apple's HDD?

    The tempeture sensor is on the logic board not the hard drive. Apple doesn't make any hard drives they buy them from other manufacturers.
    For a new hard drive try Newegg.com  
    Regular SATA drives http://www.newegg.com/Store/SubCategory.aspx?SubCategory=380&name=Laptop-Hard-Dr ives&Order=PRICE  Use the list at the left for larger and faster drives.
    SSD drives
    http://www.newegg.com/Internal-SSD/SubCategory/ID-636?Order=PRICE  Use the list at the left for larger and faster drives.
    Or OWC for regular hard drives and SSDs  http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/
    Here are video instructions on replacing the hard drive on the White Unibody http://eshop.macsales.com/installvideos/macbook_13_09_unibody_hd/
    To transfer your current hard drive I like the applications Carbon Copy Cloner or SuperDuper. They make a bootable copy of everything on your hard drive. http://www.bombich.com/index.html or http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html 
    You'll need a cheap SATA external hard drive case. Put the new drive in the case then format and partition the new drive and clone your old drive to the new one. Check that it's set up right by booting up from the external drive. Then replace your old hard drive with the new one and put your old one in the external case.
    Here's a cheap SATA external hard drive case on Amazon http://www.amazon.com/Vantec-NexStar-2-5-Inch-External-Enclosure/dp/B002JQNXZC/r ef=pd_cp_pc_0
    If you don’t have the tools to open up the MacBook OWC has a set for $5
    http://eshop.macsales.com/item/OWC/TOOLKITMHD/

  • I'm trying to sync my old ipad to itues on my laptop but it keeps saying ipad synced with another iTunes library what can I do I don't want to lose these photos?

    I'm trying to sync my old ipad to itues on my laptop but it keeps saying ipad synced with another iTunes library what can I do I don't want to lose these photos?

    You can only sync an ipad to one computer at a time.
    You can look to something like dropbox, upload your photos there, then do the sync and since your photos are backed up it won't hurt if they are deleted.

  • TA22652 Hi, I have authorized 4/5 computers, now what once I'll be done with all 5/5 computers? Can I authorize more than 5 computers?

    Hi, I have authorized 4/5 computers, now what once I'll be done with all 5/5 computers? Can I authorize more than 5 computers? Also I do not have any of the back up of other 3 computers I've authorized. Please help me!! Thanks

    No more than five computers can be authorized at any given time. Computers can be individually deauthorized by using the Deauthorize Computer function; once a year, you can deauthorize all the computers without needing access to them.
    (84740)

  • What's going to be done about the Creative Cloud debacle?

    Adobe is a maker of great software, but the 30+-hour-long disappearance of Creative Cloud revealed them as a terrible company. There was next-to-no information being released during the outage about cause, estimated time for the fix, or potential work arounds. Perhaps they were embarrassed that this was a self-inflicted error, but they should be even more embarrassed that their only response has been, "oops, sorry, we'll do better." People lost cash; they missed deadlines. A plan to reimburse customers should have been announced even as the fix was underway. They should comp every customer two months' service.
    Meanwhile, I had been under the impression that the CC software could be used in offline mode. That's the way it should be. The software is paid for and licensed a month at a time, so it should only need to be verified once a month. It should not have to sign in every time it starts up. Completely ridiculous.
    Mistakes happen and adversity cannot always be avoided, but the true test of a person--or a company--is how they respond and recover. Adobe, you are failing this test miserably.
    So, what is going to be done about this debacle?
    Neal Bowes

    If you got your phone via a network then it's up to your network to decide the fate of your phone and not Sony - Your sale of contract is with Vodafone and not Sony - So your 1st port of call is with Vodafone and if Vodafone decline then remind them of your contract of sale and who it's with
    For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled.   Richard P. Feynman

  • What are the process are done in compile time?

    what are the process are done in compile time?

    if this process occur in runtime that's called
    runtime polymorphismExactly. That's usually the case, especially with interfaces. I'm not entirely sure, but I think if you're calling final methods, those are statically linked because they can't be overridden anyway. I guess it saves a method table lookup at runtime.

Maybe you are looking for

  • IMessage issues with iPad, none with iPhone?

    Hi I just got my wifi iPad 2 today. I already have an iPhone and so do a number of my contacts, so I iMessage with all of them (not regular messaging). However when I go to send them an iMessage from my iPad, it says their cell phone number is not re

  • Family Sharing and iTunes for Windows

    My wife and I have family sharing set up and working fine across iOS devices and my macs.  She uses iTunes for windows and we can't find how to access my purchases on her machine.  We looked in the same place it is in iTunes for Mac and there is no p

  • Is there a serious flaw in LRs Print Module?

    I have been having no end of difficulty getting a decent print from LR. The more I search for answers the more I find that others have the same issue. It seems to be related mostly to Canon and HP printers. Most Epson users indicate they are getting

  • SCCM 2012 pxe boot issue

    My test machines cannot PXE boot. My lab environment is very simple: 10.10.0.0/24 subnet 10.10.0.5 = Server2012, DHCP, DNS, SQL Server 2008 R2 Sp2 10.10.0.7 = Server2012, SCCM2012 All machines are Oracle VM Box virtual machines connecting through the

  • How do I connect to a mysql database?

    I am trying to write a small program with Java to do some operation on a Mysql database. The first step is to connect to the database. Can anybody give me some information about how to connect to it with JDBC? Thank you in advance!