11g: global statistics, once done block statistics additional
This is a follow-up question
In a system, who should use additional statistics, global statistical imagined fault someone intentionally.
These aggregate statistics seems to stop to move to additional statistics.
As a special field table user_tab_col_statistics has to mean here.
See this demo program:
SET LINESIZE 130 set serveroutput on call dbms_output.put_line('drop and re-create table ''T''...'); -- clean up DROP TABLE t; -- create a table with partitions and subpartitions CREATE TABLE t ( tracking_id NUMBER(10), partition_key DATE, subpartition_key NUMBER(3), name VARCHAR2(20 CHAR), status NUMBER(1) ) ENABLE ROW MOVEMENT PARTITION BY RANGE(partition_key) SUBPARTITION BY HASH(subpartition_key) SUBPARTITION TEMPLATE 4 ( PARTITION P_DATE_TO_20160101 VALUES LESS THAN (to_date('2016-01-01', 'YYYY-MM-DD')), PARTITION P_DATE_TO_20160108 VALUES LESS THAN (to_date('2016-01-08', 'YYYY-MM-DD')), PARTITION P_DATE_TO_20160115 VALUES LESS THAN (to_date('2016-01-15', 'YYYY-MM-DD')), PARTITION P_DATE_OTHER VALUES LESS THAN (MAXVALUE) ); CREATE UNIQUE INDEX t_pk ON t(partition_key, subpartition_key, tracking_id); ALTER TABLE t ADD CONSTRAINT t_pk PRIMARY KEY(partition_key, subpartition_key, tracking_id); ALTER TABLE t ADD CONSTRAINT t_partition_key_nn check (partition_key IS NOT NULL); ALTER TABLE t ADD CONSTRAINT t_subpartition_key_nn check (subpartition_key IS NOT NULL); call dbms_output.put_line('populate table ''T''...'); -- insert values into table (100 for first 2 partitions, last 2 remain empty) BEGIN FOR i IN 1..100 LOOP INSERT INTO t VALUES(i,to_date('2015-12-31', 'YYYY-MM-DD'), i, 'test' || to_char(i), MOD(i,4) ); END LOOP; FOR i IN 101..200 LOOP INSERT INTO t VALUES(i,to_date('2016-01-07', 'YYYY-MM-DD'), i, 'test2' || to_char(i), MOD(i, 4)); END LOOP; commit; END; / -- lock table stats, so that no automatic mechanism of Oracle can disturb us call dbms_output.put_line('lock statistics for table ''T''...'); BEGIN dbms_stats.lock_table_stats(USER, 'T'); commit; END; / call dbms_output.put_line('delete statistics for table ''T''...'); -- make sure we have no table stats to begin with BEGIN dbms_stats.delete_table_stats( ownname => USER, tabname => 'T', partname => NULL, cascade_columns => TRUE, cascade_indexes => TRUE, force => TRUE); commit; END; / begin for rec in (select table_name, partition_name from user_tab_partitions where table_name = 'T') loop dbms_stats.delete_table_stats( ownname => USER, tabname => rec.table_name, partname => rec.partition_name, cascade_columns => TRUE, cascade_indexes => TRUE, force => TRUE); end loop; commit; end; / call dbms_output.put_line('verify no data avail in user_tab_col_statistics for table ''T''...'); select table_name, column_name, to_char(last_analyzed, 'YYYY-MM-DD HH:MI:SS'), global_stats from user_tab_col_statistics where table_name = 'T'; call dbms_output.put_line('verify no data avail in user_part_col_statistics for table ''T''...'); -- not sure, if this is correct(?!): select * from user_part_col_statistics where table_name = 'T' and not (num_distinct is null and low_value is null and high_value is null); call dbms_output.put_line('''accidentally'' gather global stats in user_tab_col_statistics for table ''T''...'); begin dbms_stats.gather_table_stats( ownname => USER, tabname => 'T', partname => null, estimate_percent => 1, degree => 5, block_sample => TRUE, granularity => 'GLOBAL', cascade => TRUE, force => TRUE, method_opt => 'FOR ALL COLUMNS SIZE 1' ); end; / call dbms_output.put_line('verify global_stats in user_tab_col_statistics for table ''T''...'); select table_name, column_name, to_char(last_analyzed, 'YYYY-MM-DD HH:MI:SS'), global_stats from user_tab_col_statistics where table_name = 'T'; call dbms_output.put_line('wait 30 seconds...'); call dbms_lock.sleep(30); -- might require to grant access call dbms_output.put_line('...done'); call dbms_output.put_line('try to update global_stats in user_tab_col_statistics for table ''T'' by partition level statistic updates...'); begin for rec in (select table_name, partition_name from user_tab_partitions where table_name = 'T') loop dbms_stats.gather_table_stats( ownname => USER, tabname => rec.table_name, partname => rec.partition_name, estimate_percent => 1, degree => 5, block_sample => TRUE, granularity => 'PARTITION', cascade => TRUE, force => TRUE, method_opt => 'FOR ALL COLUMNS SIZE 1' ); dbms_stats.gather_table_stats( ownname => USER, tabname => rec.table_name, partname => rec.partition_name, estimate_percent => 1, degree => 5, block_sample => TRUE, granularity => 'SUBPARTITION', cascade => TRUE, force => TRUE, method_opt => 'FOR ALL COLUMNS SIZE 1'); end loop; end; / call dbms_output.put_line('re-verify global_stats in user_tab_col_statistics for table ''T'' (check for last_analyzed and global_stats)...'); select table_name, column_name, to_char(last_analyzed, 'YYYY-MM-DD HH:MI:SS'), global_stats from user_tab_col_statistics where table_name = 'T';
Output:
Call completed. drop and re-create table 'T'... Table T dropped. Table T created. Unique index T_PK created. Table T altered. Table T altered. Table T altered. Call completed. populate table 'T'... PL/SQL procedure successfully completed. Call completed. lock statistics for table 'T'... PL/SQL procedure successfully completed. Call completed. delete statistics for table 'T'... PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Call completed. verify no data avail in user_tab_col_statistics for table 'T'... no rows selected Call completed. verify no data avail in user_part_col_statistics for table 'T'... no rows selected Call completed. 'accidentally' gather global stats in user_tab_col_statistics for table 'T'... PL/SQL procedure successfully completed. Call completed. verify global_stats in user_tab_col_statistics for table 'T'... TABLE_NAME COLUMN_NAME TO_CHAR(LAST_ANALYZ GLO ------------------------------ ------------------------------ ------------------- --- T TRACKING_ID 2016-01-28 02:09:31 YES T PARTITION_KEY 2016-01-28 02:09:31 YES T SUBPARTITION_KEY 2016-01-28 02:09:31 YES T NAME 2016-01-28 02:09:31 YES T STATUS 2016-01-28 02:09:31 YES Call completed. wait 30 seconds... Call completed. Call completed. ...done Call completed. try to update global_stats in user_tab_col_statistics for table 'T' by partition level statistic updates... PL/SQL procedure successfully completed. Call completed. re-verify global_stats in user_tab_col_statistics for table 'T' (check for last_analyzed and global_stats)... TABLE_NAME COLUMN_NAME TO_CHAR(LAST_ANALYZ GLO ------------------------------ ------------------------------ ------------------- --- T TRACKING_ID 2016-01-28 02:09:31 YES T PARTITION_KEY 2016-01-28 02:09:31 YES T SUBPARTITION_KEY 2016-01-28 02:09:31 YES T NAME 2016-01-28 02:09:31 YES T STATUS 2016-01-28 02:09:31 YES
seems that the solution is to use the parameter cascade_parts-the online of FALSE:
begin dbms_stats.delete_table_stats( ownname => USER, tabname => 'T', partname => NULL, cascade_parts => FALSE, -- this is important cascade_columns => TRUE, cascade_indexes => TRUE, force => TRUE); end;
Tags: Database
Similar Questions
-
Remove the global statistics, leaves in 10.2.0.3 partition level.
Hello
There 10.2.0.3 node 4 rac data warehouse, most of the queries are with predicate associated with partition key.
So, there's a lot of cutting partition involved.
Currently, data loading is done via the swap partition and then only that his stats of score is calculated.
We have global stats (global_stats = NO in dba_tables).
Is this right way to treat the 10.2.0.3 statistics?
I know that 10.2.0.4 brings us copy stats solution, but with 10.2.0.3?
How to manage updates statistics, related to shared partition.
As much as I know there is no way to incrementaly update the global statistics, so granuality = > partition seems
the only way.
If I had properly, Oracle calculates global statistics level partition statistics if there is no global stats based on 'true '.
The only issue that I know is related to the estimation of NDV, but I think we can with that life.
Please advice.
Kind regards.
GregGReally, you need to collect time partition and overall stats. If a query spans more than 1 partition, then global stats are generally used. Stats of the partition are used when there is only a single partition access.
There is no way in 10g for additional aggregate statistics. Which was introduced in 11g. Aggregate statistics are collected by a table scan, they are not aggregated over 10g, 11g only with active differentials.
However, there is a granularity again introduced in 10g called APPROX_GLOBAL AND PARTITION. This is part of the patch 6526370.
I would recommend that collect you global or use the PARTITION AND of APPROX_GLOBAL, but it is better to have a few global statistics.
More details on this here:
http://structureddata.org/2008/07/16/Oracle-11g-incremental-global-statistics-on-partitioned-tables/--
Kind regards
Greg Rahn
http://structureddata.org -
I was probed to always select "allow", "allow once" or "Block" for an incoming program. I accidentally click "block" and my program worked more! Please explain how I can allow the program to work again?
How can I reverse the error?ConcerningJollyJWithout doubt blocked by any firewall you have installed, that being the review of the cases of your firewall settings that relate to this program
-
Once done your preliminary tests on all files created with muse this corrupt somehow, or will they be OK? My company wants to use a product test to determine whether to buy this product for the future. These files created will be able to function properly on the web once my trial? Or it would require buying keep these files up and working properly?
Hello
The files are not affected at the end of the Muse. Site will work very well on the web.
Kind regards
Aish
-
Adding metadata to a song in the iTunes library has no effect anywhere else (as in Windows Explorer or the Groove music).
I would like to know if I have disabled this in error or if it is not guaranteed to all visitors.
Where it is not provided to customers, I would like to know how iTunes stores this metadata and whether it can be automatically sent to the library of Windows.
Thank you.
A reason of changes committed to iTunes cannot be is covered in the tip of the user, fix the iTunes for Windows security permissions but iTunes usually returns to the original data if you probably don't see this particular problem. The other possibility is of several tags.
Several tags (Mp3 files only)
The ID3 specification allows files to have several tags in different versions and languages, but iTunes does not work properly with simple tags. When multiple tags are present it can sometimes do not apply updates to the tag that reads back (probably update one of the others in the file) and it is also possible that the iPod and iTunes may have different rules for the tag that they give priority to. This could lead to situations where everything is properly organized in iTunes, but then inexplicably collapses on an iPod, or tracks that display different information in Windows Explorer or another media player. There are tags 3rd party editors that allow to manipulate several tags, but I don't have a casual recommendation. A workaround in iTunes is to use the context menu convert the ID3 Tags... > None a few times to remove all the labels, then convert ID3 Tags... > v2.3 to build a cool tag with information still held in the iTunes database. I've read in the past that iTunes is not completely compatible with the specification v2.4, although this may be the case, support is more however for v2.3 is widespread, then I would say using v2.3 to v2.4. All embedded work will be deleted so it must be replaced if wanted. For Windows users running a script named CreateFolderArt before and after the cleaning process tag should handle this.
Note that some data, for example the sides and the counties of game, is only stored in the database internal iTunes and not surrounded by tags.
TT2
-
I need a script to database password - protect a page on the website of our company. There's nothing that needs to be protected, but would introduce more professional if it was only the employees who could access it. I do not want to use any kind of server-security - if it is possible to do it with a simple script, it would be preferable.
I tried this: http://www.dynamicdrive.com/dynamicindex9/password.htm
It worked the first time - I entered the name of user/pw and it took me to the right page. Then I tried again, and it just redirected me to the same login page. After trying a few times, it doesn't even recognize the user name and pw - I could type anything in and it would be just just refresh the page.
-I just started to use dreamweaver, so please keep it simple...
Hello
If you really must use a simple javascript to protect, try http://www.javascriptkit.com/script/script2/loginpass2.shtml.
PZ
-
How to collect statistics for a partition?
Hi all
I create a table partition. I need to collect statistics for this partition only. Before I used to analyze it, but now I need to analyze using DBMS_STATS.
What is the best way to analyze the partition using DBMS_STATS?
How long will it take to complete?
How can I estimate the time of accomplishment for DBMS_STATS before starting?
Thank you
I create a table partition. I need to collect statistics for this partition only. Before I used to analyze it, but now I need to analyze using DBMS_STATS.
What is the best way to analyze the partition using DBMS_STATS?
Follow the documented instructions: INCREMENTIELLE TRUE and GRANULARITY on AUTO.
See the section "Partitioned objects statistics" the doc of performance tuning
http://docs.Oracle.com/CD/B28359_01/server.111/b28274/stats.htm#i42218
With partitioned tables, the new data is usually loaded into a new partition. As new partitions are added and loaded, statistical data must be collected on the new partition and statistics need to be updated. If the
INCREMENTAL
for a partition table is set to the valueTRUE
, and collect you statistics on the table with theGRANULARITY
parameter defined onAUTO
, Oracle will collect statistics on the new partition and update statistics on the overall table by scanning only those partitions which have been modified and not the entire table. If theINCREMENTAL
for the partitioned table is set to the valueFALSE
(the default), then a full table scan is used to maintain the global statistics. It is a highly resource intensive and time-consuming for large party.How long will it take to complete?
No way to know - using an estimate of 10% takes less time than with an estimated of 40%, which takes less time than using 100%.
How can I estimate the time of accomplishment for DBMS_STATS before starting?
By comparing the amount of data and the percentage of estimate for the data that you have in the other partitions and the time required to collect statistics on other partitions.,.
-
Windows 7 then look at an internet (with explorer) hangs on a blue screen and runs or exports a thing of memory then try to reboot from the black screen BACK. Once it blocks he continues to do it regularly. I rebooted then F8 and run the memory verification, and it seems to work for awhile and I have extended the temporary internet memory to 1000 k. Can before if necessary mini discharge can not see myself. Any help would be great.
Hi Rudi,.
you get this crash:
Bug Check 0x1E: KMODE_EXCEPTION_NOT_HANDLED - This indicates that a kernel-mode program generated an exception which did not catch the error handler.
Arguments:
Arg1: ffffffffc0000005, unhandled exception codeExceptionCode: c0000005 Access violation =
the driver, resulting from this is the driver of Norton/Symantec SYMTDI. SYS.
Image path: \SystemRoot\System32\Drivers\N360x64\0308000.029\SYMTDI. SYS
Image name: SYMTDI. SYS
Timestamp: Thu Jul 07 02:28:48 2009So put day/remove Norton/Symantec to fix.
André
"A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/
-
my hard drive is 303 dead and I don't have recovery
HP pavlion 1313ax g6
Hello
Regarding replace HARD drive, drive on the link below is an example of one that would be perfect for your laptop.
The procedure to replace the hard drive begins on Page 56 of your & Maintenance Guide.
Regarding the reinstallation of the operating system on the new HARD drive, there are two options available.
1. you can order a set of replacement recovery disks using the link below - it will reinstall the operating system, all the drivers, and almost all of the original software (the exception being often tests of MS Office). They will also recreate all of the original scores, including the recovery Partition.
2 you can use the following method to create your own family Windows 7 Edition installation disk basic 64-bit.
Before you try the following, make sure that you can still read all the key character product activation 25 on your label Windows COA (5 blocks of 5 alphanumeric games).
An example of a COA label can be seen here.
You can create a Windows 7 installation disc yourself using another PC. However, it not there no download directly available for Windows 7 Home Basic Edition, so you'll need to download another version (one will do, but the link below is for Windows 7 Home Premium 64-bit - the source of the Windows Image is Digital River.).
Windows 7 Home Premium SP1 64-bit
For the key on your label of COA to work, you must now use the method described in the following link to convert this ISO to an all-version Installer.
http://www.SevenForums.com/tutorials/85813-Windows-7-universal-installation-disc-create.html
Once done, use an application like ImgBurn ( Note: you can deselect additional software during installation of ImgBurn offerings) to burn the ISO correctly on a blank DVD - a guide on the use of ImgBurn to write an ISO on a disc is here.
Use the disk to perform the installation, enter the activation key of Windows on the label of the COA at the request and once the installation is complete, use ' 'phone Method' described in detail in the link below to activate the operating system -this made method supported by Microsoft and is popular with people who want to just have a new installation of Windows 7 without additional software load normally comes with OEM installations.
http://www.kodyaz.com/articles/how-to-activate-Windows-7-by-phone.aspx
You could possibly need for your laptop can be found, additional drivers and software here.
Kind regards
DP - K
-
When Oracle uses GLOBAL level statistics, and when he uses his stats level PARTITION?
for example, I know if I say PART_KEY = 10 then it will use stats level Partition... and when I do not specify part_key in SQL, it uses its global stats... Looking for all other scenarios where it will use one or the other?user4529833 wrote:
So if I see any KEYS or KEY (I) in the execution plan, can, I concluded that he had used the GLOBAL statistics?Basically, Yes, but there are variations, for example you might have a range composite-list partitioning where you can carve out a single range partition, but you have an unknown number of list partitions in this partition of unique beach to visit. Then we saw the KEY / KEY (I), but still the optimizer could use the partition level statistics (in the execution plan you would see probably a RANGE PARTITION row to indicate).
Also, below 10.2.0.4, Oracle does not use, subparitition stat even if I say sub_part_key = 10?
Yes, as you can see in my test case. This generally isn't a problem if you use hash composite partitioning (since you don't treat a subpartition directly), but as already stated, can be a problem if you have for example a list subpartitions which differ considerably in size / model data / tilt etc.
Kind regards
RandolfOracle related blog stuff:
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/Published by: Randolf Geist on December 11, 2008 17:21
More details about the added pruning
-
Reported popup web site tries to access Firefox (don't remember exact message); available buttons: allow once, allow, block; has chosen the block (I selected allow once before, but that seemed to be a bad idea). After that, I get "Unable to connect" no matter where I go. You had to use IE to join of Mozilla.org. Firefox update did not help. Troubleshooting procedure did not help.
Hello, this looks like a problem with your security/firewall software blocking the new versions of firefox. If please delete all the rules of the program for firefox to your firewall and let it detect the new version of the browser again.
Difficulty of problems connecting to websites after Firefox update
-
How to unlock Firefox after accidentally blocked it
I was watching when I got a pop up saying someone was sending data in my computer (or something similar) with the choice of allowing; allow once or block. It was not not clear to me that it was Mozilla trying to access so I told block and quickly discovered that I could no more use Firefox as my browser, a few hours to browse the Windows Action (on Windows 8) Center in McAfee, found no solution.
I hope that there is a simpler solution that deleting the files existing and re - install.
See you soon
MitchBlocking must be really using a program Avtivirus. Disconnect the internet of a movement and disable all antivirus software and windows firewall and see if you are able to start firefox.
If you have set up to sync... Try reinstalling FireFox.
When using the verbage block windows firewall.
don't forget to return the software antivirus and other settings before switching on the internet.
-
How can I enable parental block on hotmail
I'll give my son my account, how do I activate the parental block?
Hello
When you say that you will give to your account, you talk to your e-mail account or a user account with administrator rights? To set up parental controls, you must be connect to a parent account with administrator access, and then create a standard account for your son because the latest version of Family Safety now uses the standard user accounts (logon Windows) as a child in the safety of the family. If you need to know about adding a user to the Windows login with standard privileges, please see this link.
If you have already created a standard user and you want to manage under parental control, then follow these steps:
1. run the parental control on a Windows account with administrator privileges. If this is your first time running the parental control, you need to sign in using your Microsoft Account.
2. after login, select the standard Windows account that you want to monitor as a child by checking the box to the right of the name of the account, and then click Next after.
3 on the right, you will see members parental control with a list of drop down option. Click the menu drop-down, and then select Add standard account name.
4. click on record. Wait until the installation is done.
5. Once done, you should see the name of the account under Windows monitored accounts.
Note: In order to set the parental controls you must first install Windows parental control. If you are using Windows 7 and you not him have not yet downloaded, please visit
http://Windows.Microsoft.com/en-us/Windows-Live/Essentials-home
To learn more about parental controls, please click here.
If you have any other questions, please let us know.
Thank you!
-
Well... it was annoying HORFICALLY, I just download Aion and every time I do the Launcher, it gives me the error "Ceased to function" message. It's really just annoying horribally. Can someone help me please? How can I fix? I just want to play aion > _ > I'm not paying $ 70 for windows of ruin and almost throw it away. so please tell me how I can somehow do so this program DOES not work properly? I have sp2.
You have SP2? XP or Vista? In addition, this sound like a problem more suited to developers of Aion because I think not that there are some compatibility fixes or workarounds on this end you can do.
I looked around and have not really seen all solutions outside of these two
Please, try the following to resolve the problems of crash with the NCsoft Launcher:
1. Please try all the steps described in this Knowledge Base article: http://help.ncsoft.com/cgi-bin/ncsoft.cfg/php/enduser/std_adp.php?p_faqid=6085
2. Once done, please uninstall the NCsoft Launcher. (If you have games installed please remember to uninstall not these games when prompted)
3. download and install the NCsoft Launcher from here: ftp://ftp.aiononline.com/Launcher/NCsoftLauncherSetupAion.exe
Source: http://na.aiononline.com/forums/support/view?articleID=2870
After watching the official forums, it doesn't look like you guys Aion is very good client is supported on the forums or with those 2 maximum of penalty support tickets :/
-
How to re - block an app.
So, I recently blocked an app, Hearthstone. So that my child could play on an account separately for this game that has an allocation of time. (Believe it or not, it was their idea that they lose additional time on this subject.) Anyway, they were on the account that has the locked app and one day they had a lot of free time and a friend on the. Thus, they asked what did I unlock. Only now, I can not re - block the app. It is listed as blocked under the section app (three instances of the application). I tried enabling it manually from the section app then re-blocking as well as turning off the blocking feature app and turning back, the two nothing helps...
How can I re - block this app? Is there a location in the parental control that stores my e-mail "permissions"? If so I could just go and remove the permission, but as it is, I am of ideas.
Sara,
I got him from my parental control account, which has removed all restrictions, then I put him on the account. It worked perfectly and the app is once more blocked.
Thank you!
Maybe you are looking for
-
When I reply to an email with attachments, I lose the original email attachments. How to make a comeback? Peter MacAir mid 2013 MOSX 10.11.6
-
Satellite A75-S211 is very slow
I've been to a malware expert forum and posted Hijack this logs and this machine is more than likely own. Awhile back, we had to replace the modem due to problems of dispersal of heat (so they said) and I fear that the thing is about to fry itself no
-
I just bought the Apple TV 4 mainly because I wanted to feature airplay - to-peer I've heard so much about the new revision of the Apple TV 3. I thought that the Apple TV 4 would have the same characteristics and much more than the old model, but I c
-
There is only one drive when you use the recovery on the Satellite L series disk
Hi, I just reformat and reinstall windows using the toshiba recovery disk, before this fitness, I had 2 drives, drive C and drive D, theres now only one C drive.Also when I press the SHIFT key and simultaneously press the key with 2, trying to type "
-
Envy 17 t J100: Windows 10 is not good upgrade on HP garbage owners
Hello Am I crazy? Not so much of an issue - just a warning on the HP proprietary, software drivers and windows 10. I've updated two tablets of Samsung windows and an old desk with NO problems. Exclusive HP on my desire to TRASH turned into a door st