Estimation of lines wrong with the size of the dynamic partition
Hi allVersion 11.1. RAC 4 knots. I met a sql that runs slowly because the bad LINES estimate. Here's the exectuion its plan.
Please note that the plan is just a part of the plan real exectuion. And I have collected statistics for all the tables involved, so I think that statistics should be updated.
Please see below. CBO estimated that only 640 lines for step 5 and 115 for this SQL totall. But the real result was almost 14K lines.
I don't know if the CBO made this mistake because of the size of the dynamic partition?
PLAN_TABLE_OUTPUT
Plan hash value: 2984909170
--------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
--------------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 115 | 33005 | 2801 (8)| 00:00:09 | | |
| 1 | NESTED LOOPS | | 115 | 33005 | 2801 (8)| 00:00:09 | | |
| 2 | PARTITION LIST ALL | | 1 | 201 | 1482 (5)| 00:00:05 | 1 | 30 |
|* 3 | TABLE ACCESS FULL | OPT_ACCT_ASDN_TYPE2_DIM | 1 | 201 | 1482 (5)| 00:00:05 | 1 | 30 |
| 4 | PARTITION LIST ITERATOR| | 640 | 55040 | 1319 (12)| 00:00:05 | KEY | KEY |
|* 5 | TABLE ACCESS FULL | OPT_FUND_GEN_SPNDG_FCT | 640 | 55040 | 1319 (12)| 00:00:05 | KEY | KEY |
--------------------------------------------------------------------------------------------------------------------
But I made another simple test, in which I just used a predict as partition_key =: b. the exectuion plan resemblesPLAN_TABLE_OUTPUT
Plan hash value: 1115434777
----------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |
----------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 980K| 80M| 1390 (17)| 00:00:05 | | |
| 1 | PARTITION LIST SINGLE| | 980K| 80M| 1390 (17)| 00:00:05 | KEY | KEY |
|* 2 | TABLE ACCESS FULL | OPT_FUND_GEN_SPNDG_FCT | 980K| 80M| 1390 (17)| 00:00:05 | KEY | KEY |
----------------------------------------------------------------------------------------------------------------
The estimate is more reasonable this time. Can someone show me why CBO made this mistake or why think CBO, there are only 600 lines while in reality there are more than 20 k lines.Best regards
Leon
Published by: user12064076 on March 2, 2011 12:10 AM
Published by: user12064076 on March 2, 2011 01:01
Published by: user12064076 on March 2, 2011 01:11
The 'A-Time' is known to be wrong sometimes. However, the "buffers" are correct.
So the reading of the partition of the fact Table was 14Mo scan (1804 puts buffer @8 KB each). Which is really not much.
Yes, the cardinality estimate is off, but for a scan of 14Mo Oracle effort is not very high.
Cardinality for the recovery of the fact table is based on the statistics of column for the BUS_UNIIT_SKID and the ACCT_SKID. Because Oracle does not know what BUS_UNIT_SKID and ACCT_SKID values will be extracted from the Dimension table that results in the query, it can't really come up with an accurate estimate - even more if the data are biased.
From the column of table-level statistics, the optimizer knows how many distinct values of BUS_UNIT_SKID exist in the table.
From the column of table-level statistics, the optimizer knows how many distinct values of ACCT_SKID exist in the table.
But for a lost combination (BUS_UNIT_SKID, ACCT_SKID) in any unknown partition (the ' unknown' because it does not know the values or the partition during the query optimization) you can calculate an estimate only - the combined cardinality estimate is generally
(somewhat simplified)
Estimated_Number_of_Rows_of_Unknown_Partition X (1/Distinct_BUS_UNIT_SKIDs X 1/Distinct_ACCT_SKIDs)
OR
Estimated_Number_of_Rows_of_Unknown_Partition X (5% estimate X 5% estimate)
that will be very low.
You can run a plan to explain the "simplified" with the 10053 EVENT query
alter session set events '10053 trace name context forever, level 1';
explain plan for SELECT ......
exit
and display the trace file generated for more information on how Oracle considers the cardinality.
Your problem with the complex query is not likely here. You have to restyle the entire query instead of focusing on the estimation of cardinality for this fact table.
The query can be modified to help identify the Partition - Partition pruning - advance statistics?
The query can be modified in order to carry out the operations in a different sequence - get first performance and the effort of each step of the query Plan.
(BTW: the Dimension table reading was the most expensive part of this performance)
Hemant K Collette
Published by: Hemant K Collette on March 3, 2011 11:50
Tags: Database
Similar Questions
-
What's wrong with the dynamic region within the static region
Hi all
I use Jdeveloper 12 c
I do app with a jsf page (man.jsf) contains the static region (xxx.jsff)
the static region contains a dynamic region and I define the scope in the tent (adfc-config) (backingbean extended, scope of the request, see scope)
the result is main.jsf is empty
hand. JSF > > xxx.jsff (static region) > > bb.jsff (dynamic region)
http://127.0.0.1:7101/face/hand? _afrLoop =
What is the solution for this problem.
Hello
Actually the managed bean used by the static region should be extended to at least view. The managed bean should be defined in the configuration of the workflow of the static region.
Frank
-
What wrong with the search bar?
Firefox is seriously p * ing me off today, what's wrong with the browser, it serves to be one of the best, now an absolute piece of software of the waste processed sound.
Anway my problem is, AFTER upgrading firefox, I can't use my SEARCH BAR to look for anything!
I continue to redirect to this
file:///C:/users/Kamran/appdata/roaming/ToolbarInstaller/ToolbarInstaller/1.0.0.0/Google.html
which is not very useful!
I think it might be interesting to switch to google chrome and get rid of that junk!
Edited by a moderator because of the language. See the rules and lines guidelines .
Hi, I did what you said and disabled all add ons and one allowed them and managed to make it work. It was the 'googlebar update"add that I disabled it and everything went back to normal
Thank you very much
-
Cannot, sign, only get a white screen, is there something wrong with the application?
[Duplicate message deleted... post the same question more than once is confusing... MOD]
[This is an open forum, not a direct line to Adobe support... you have to wait a response]
WHITE cloud screen http://forums.adobe.com/message/5484303 can help
- and step by step http://forums.adobe.com/thread/1440508?tstart=0
- and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html
-
I El capitan, but stopped opening safari says impossible to find something wrong with the application extension
You can open it by accessing it in the Applications folder? If so, you may have a corrupt Dock alias. Click and hold the alias and make it about 1 inch away from the docking station, then release. Then drag the application in the Applications folder in the Dock to create a new alias. When you have a new alias, control - click/Options/keep in Dock.
-
I have a question about the time machine. I recently updated my Quicken 2015 and there was something wrong with the update. Can I come back in all the Quicken file and restore from time Machine before I downloaded the update to do, I need to restore the entire computer?
Yes, you can just restore this file or application. Use Time Machine to back up or restore your Mac - Apple Support
-
'Something wrong with the credentials' sign in error
When I try to recover my gamertag, it says "sorry, but there is something wrong with the credentials you use to connect." How can I fix it?
Hello
Answers has no influence on the XBox or XBox Live must
contact with them.XBox - Support
http://support.Xbox.com/en-us/pages/default.aspxXBox - Contact us (support)
http://support.Xbox.com/en-us/contact-usXBox - Support Forums - and my XBox (top-right)
http://forums.Xbox.com/Xbox technical support phone number
- Toll-free: (800) 4MY-XBOX or (800) 469-9269
XBox LIVE - Service status
http://support.Xbox.com/en-us/Xbox-Live-statusManage the XBox Live account
http://support.Xbox.com/en-us/billing-and-subscriptions/account-management/Xbox-Live-account-managementXBox Live Sign-in problems
http://support.Xbox.com/en-us/billing-and-subscriptions/Windows-Live-ID/Xbox-Live-sign-in==================================================
If you have problems connecting with the Microsoft Account (formerly
Windows Live ID) and then check in this forum. (This thread has been
moved on this forum and a Moderator Microsoft should be along
to help.)Answers - Hotmail, Messenger, and SkyDrive (and all things Windows
Live webcam) - Microsoft - Forum login and logout account.
http://answers.Microsoft.com/en-us/windowslive/Forum/LiveID-signinI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
When I click on any icon in my control panel, a black window opens and C:WINDOWS\system32\rundll32.exe is what's wrong with the system
{Assuming the rundll32.exe file is not found}
See if them can restore the file rundll32.exe:
http://support.Microsoft.com/kb/812340 Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience] -
After editing an image in windows Photo Gallery can't save the picture. I get a message that tells me that something is wrong with the application. How to fix this problem?
Hello
I suggest you to refer to this link and check if it helps:
http://Windows.Microsoft.com/en-us/Windows-Vista/Windows-Photo-Gallery-frequently-asked-questions
It will be useful.
-
How can I measure the length of the lines written with the Paint program?
I know that an earlier version of the painting software was able to measure the length of the lines written with the Paint program. I don't know what version it was. I have the Windows 7 Home Premium Version 6/1 (Build 7601 Service Pack 1, Copywright@2009. How can I measure the length of the lines that I have the project using paint software? Do I need to get the previous version? How can I get? PLEASE ANSWER!
Hi Ralph,
The description of the problem seems a little unclear and I wish I had a better understanding before you start working on it. I would really appreciate if you could answer the following questions:
1. What is the name of the paint program?
2 have you tried to install the software of paint in Windows 7?
3. are you able to install it? If this is not the case, do you have an error code or message?
4. in what version of Windows was fine paint software work?
Please provide us with more information on the specific question to help you to fix as soon as possible.
Your response is very important for us to ensure a proper resolution. Please get back to us with the information above to help you accordingly.
-
Hi, I tried to download the trial version free photoshops and after I sign in I get this pop up message saying ' unable to reach adobe servers please check your firewall settings ", I checked them and there is nothing wrong with the firewall, is there a problem with the adobe servers? can someone help me?
Please try the steps mentioned in: https://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
-
In Adobe Flash CS6, I have a blue box appearing around lines drawn with the line tool (and other tools like the brush etc.). Whenever I try to use a tool, a blue box appears around the line and I have to double click on it to handle, which opens just this line in a screen finery semi where all other objects are semi-gris in the background. I can handle this line in this screen, but nothing else at this point I could do 5 minutes ago. For example, I can no longer reach the 2 lines drawn by the tool online together. For some reason, it started randomly (probably due to an accidental combination) and I just can't put it to what it was. I inserted a video showing if all goes well I mean. Any help would be appreciated.
Object drawing mode. Simply disable it in the tools Panel, or by using the default keyboard shortcut, which is J.
-
... Only to repeat it once again here.
Why people have suddenly begun to report their entire question in the place that is intended for a brief description of the problem. Is there something inherently wrong with the new format of format?
Ahhh, now I see.
The man, who is just really, really bad design forum.
I know that it will hurt, Adobe, but you will be away to Jive at a given time. You're going to have to, as Jive moves further and further away from the ease of use. So... Dick.22 now, or le.45 later.
-
Problems of Satellite C660 - 10 d with the recovery partition
Hello
I have the Toshiba Satellite C660 - 10 d and has not copied the recovery you had problems with the recovery partition and I lost.
What can I do?
You can order a new disc of recovery here:
http://backupmedia.Toshiba.EU/landing.aspx -
Navigation of the page with the dynamic action button.
Hi all
I use apex 4.2.6 on windows 8.1
I create a button with the dynamic action.
When the end user, click on the button, I want to access a page.
How to do this?
I created a branch of this button to access the page 10 on SUBMIT AFTER TREATMENT CALCULATION VALIDATION.
but no navigation happens.
they code plsql works well that is put into the dynamic action, but the page is not navigate.
kindly guide me.
Kind regards.
Maahjoor wrote:
I create a button with the dynamic action.
When the end user, click on the button, I want to access a page.
How to do this?
I created a branch of this button to access the page 10 on SUBMIT AFTER TREATMENT CALCULATION VALIDATION.
but no navigation happens.
they code plsql works well that is put into the dynamic action, but the page is not navigate.
If you want to run the PL/SQL code and creates a branch to another page, why do you use a dynamic action? The easiest way to do this is the button send page, the PL/SQL to run as a process after submit (potentially conditional, click on the button) and the page navigation to achieve using a plug (once again, perhaps conditional on the button that is clicked).
Maybe you are looking for
-
C55-b860 satellite is not booting
Hi all I have a Satellite laptop c55, b860 which is not booting unfortunately. I disassembled it and deleted all the components that are connected to the MB, including hard drive, keyboard, and touchpad and also changed ram, but still the laptop does
-
HP OFFICE NETWORK CONTROLLER MISSING IN DEVICE MANAGER
I can't connect to the wi - fi network because the network controller is missing in Device Manager. Please help with link where I can download the right software to. My hardware ID as it is in Device Manager - Properties - Hardware ID is PCI\VEN_1814
-
Video call Tango for Atrix came out :-)
Finally a videoconference for Atrix application out that cell phone users can use too (iPhone, Android). I have not yet tried, but I hope that it works.
-
Remove line home pg up, pg dn buttons does not
Laptop HP G60 - 243CL PrtSc remove line home pg up, pg dn buttons does not. they simply stop for some odd reason. How to fix? Thank you laptop is under warranty Bill
-
I get a request for update update of SQL server 2005, (not even sure if I need the SQL code on my laptop) and it never ends. It errors. It seems to open a box to find a file called (sqlrun_sql.msi) this file does not exist on my system. Unable to rei