Table Analyze Automatically
Hi,
My database in 10g Linux envirnoment, I have found that some of the tables in database are analyze autometically.
Is it possible in 10g that oracle will analyze the tables autometically at perticular time.
Please help.
Anand
By default, 10g ships with a DBMS_SCHEDULER job that automatically gathers statistics when Oracle considers the statistics stale. If you did not disable this job, it would be expected that Oracle would gather statistics automatically during the nightly maintenance window.
Justin
Similar Messages
-
Is it possible to add counter in table maintenance (automatically)?
sap ver. 4.7
is it possible to generate counter in table maintenance (automatically)?
i mean without building dialog screen / table control .
exmple :
the user insert .....
name
name
name
name
i add as key (automatically)
1
2
3
4Hi,
It is possible to do the same by not adding new dialog screen / table control .All table maintainance are infact module pool programs ...While creating a tabe maintainance we have an option of 2 step or 1 step ->these screen numbers are the ones which are displayed in table maintainace SM30
So we can infact do coding in PAI and PBO of these screens.
But the main disadvantage is that if you re-generate the table maintainace the code in PAI and PBO gets deleted for that screen
eg:if you table maintainance is assigned to function group ZFXNGROUP -> go to se38 -> see program SAPLZFXNGROUP
just add SAPL to function group suffix to get the module pool and the view screen number(same as that given in table maintainace for step1 and step2) ..in the PBO /PAI write the necessary code to increment the counter..
we can just do a loop at screen and hide the counter field while incrementing in the PAi/PBO logic as required
But once again,regeneration of table maintainace in the screen overwrites the PBO/PAI..the best we can do is create subroutines and write the code in a new include..so that everytime the code is overwritten...we need to just write the subroutine name in flow logic since includes are not overwritten in regenerations
Also if we use the same function group for multiple table maintainance we have different screens,Pls make sure you are not editting the wrong screens......
Hope it helps
Pls check and revert
Regards
Byju -
<p>
{color:#339966}Hi,
I have a very basic question.
I want to know what exactly happens in the Database architecture when a table analyze is done by gathering the stats.
How does this analyze helps in performance of queries.
Thanks
Mns{color}
</p>hi,
Table analyze is done to get the internal details for the table like exact space used,exact blocks used,row chaining etc.
optimizer uses these details in creating execution plan for the statements for that table.
SQL> set lines 10000
SQL> select table_name,num_rows,blocks,chain_cnt,avg_row_len from user_tables where table_name='EMP';
TABLE_NAME NUM_ROWS BLOCKS CHAIN_CNT AVG_ROW_LEN
EMP
SQL> analyze table emp compute statistics;
Table analyzed.
SQL> select table_name,num_rows,blocks,chain_cnt,avg_row_len from user_tables where table_name='EMP';
TABLE_NAME NUM_ROWS BLOCKS CHAIN_CNT AVG_ROW_LEN
EMP 14 1 0 40
Regards
Edited by: NKU on Nov 5, 2008 12:28 AM -
Datapump import of tables will automatically rebuild indexes ?
dear all,
do datapump import of tables will automatically rebuild the indexes againts the associated tables?
urgent response pleaseYes indexes are rebulit.
From dba-oracle
Set indexes=n – Index creation can be postponed until after import completes, by specifying indexes=n. If indexes for the target table already exist at the time of execution, import performs index maintenance when data is inserted into the table. Setting indexes=n eliminates this maintenance overhead. You can also use the indexfile=filename parm to rebuild all the indexes once, after the data is loaded. When editing the indexfile, add the nologging and parallel keywords (where parallel degree = cpu_count-1). -
How May i verify, table analyzed or not and if yes, when it was done?
How May i verify, table analyzed or not and if yes, when it was done?
SQL> desc user_tables
Name Null? Type
TABLE_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(30)
IOT_NAME VARCHAR2(30)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2(3)
BACKED_UP VARCHAR2(1)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2(10)
INSTANCES VARCHAR2(10)
CACHE VARCHAR2(5)
TABLE_LOCK VARCHAR2(8)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2(3)
IOT_TYPE VARCHAR2(12)
TEMPORARY VARCHAR2(1)
SECONDARY VARCHAR2(1)
NESTED VARCHAR2(3)
BUFFER_POOL VARCHAR2(7)
ROW_MOVEMENT VARCHAR2(8)
GLOBAL_STATS VARCHAR2(3)
USER_STATS VARCHAR2(3)
DURATION VARCHAR2(15)
SKIP_CORRUPT VARCHAR2(8)
MONITORING VARCHAR2(3)
CLUSTER_OWNER VARCHAR2(30)
DEPENDENCIES VARCHAR2(8)
COMPRESSION VARCHAR2(8)
SQL> -
Is it possible to increment the table rows automatically?
In my HTML page I created one table with some columns but i'm unable to write code for incrementing the rows dynamically....
i.e.. soon after entering the data in the last column, a new row should be automatically created by pressing enter key (without using any buttons it should create new row).... Is it possible...I don't think so. You have to trigger an js event to create a new row, I guess. You may need to write lot of javascript code. You can look for some third party grid controls.
-
How to make one column only in table control automatically filled in ?
Hi ,all.
I meet an issue while doing my screen programming. I have a table control on screen which has a few of column. And I want to display date in my first column each row automatically when user open that table/table control. All other column must be in empty in order to let user key in.
Hope anyone can help me in this issue.
Thanks in advance.Hi
Flow Logic:
PROCESS BEFORE OUTPUT.
MODULE STATUS_2209.
MODULE GET_DATA. "enters required no of dates in ur itab
loop at itab with control TBL1.
module POPULATE_TBL. "fills date col alone in tbl ctrl
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_2209.
loop at itab.
module UPDATE.
endloop.
Code:
*& Report YFEB2_SCREEN_TBL *
REPORT YFEB2_SCREEN_TBL .
TABLES: YSTUDENT.
CONTROLS TBL1 TYPE TABLEVIEW USING SCREEN 2209.
DATA: OK_CODE LIKE SY-UCOMM,
itab TYPE TABLE OF YSTUDENT WITH HEADER LINE, "ystudent is the db tbl i use
WA LIKE LINE OF ITAB,
v_date like sy-datum.
v_date = " initialise to start date.
CALL SCREEN 2209.
*& Module GET_DATA OUTPUT
* text
MODULE GET_DATA OUTPUT.
do 10 times.
itab-date = v_date.
append itab.
v_date = v_date + 1.
enddo.
ENDMODULE. " GET_DATA OUTPUT
*& Module POPULATE_TBL OUTPUT
* text
MODULE POPULATE_TBL OUTPUT.
MOVE ITAB TO YSTUDENT.
ENDMODULE. " POPULATE_TBL OUTPUT
*& Module UPDATE INPUT
* text
MODULE UPDATE INPUT.
WA-DATE = YSTUDENT-DATE.
WA-ID = YSTUDENT-ID.
WA-NAME = YSTUDENT-NAME.
INSERT YSTUDENT FROM WA.
ENDMODULE. " UPDATE INPUT
*& Module STATUS_2209 OUTPUT
* text
MODULE STATUS_2209 OUTPUT.
SET PF-STATUS 'BACK'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_2209 OUTPUT
*& Module USER_COMMAND_2209 INPUT
* text
MODULE USER_COMMAND_2209 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_2209 INPUT
If you have a specific date upto which you want you can declare a var for that and while filling the itab you can use it in condition.
Hope this helps
Regards,
Jayanthi.K -
Need help with creating table that automatically inserts rows depending on the amount of data
Hi there,
I'm trying to create a table for supervisors to enter in their subordinates information and will automatically insert rows for supervisors with multiple subordinates. This form will not be connected to a data source, the supervisors will simply fill in the form and print out. I want it to kind of look like this:
Name
Position #
Classification
Hours
I really appreciate any help. Thanks!Hi Niall,
You figured it out! I didn't have javascript turned on. Now it is working perfectly. I think this will help me tremendously. Thanks so much for your help!!!!!
Laura -
When is table analyzed after mapping
The OWB 10.1 User Guide says this about the mapping configuration parameter Analyze Table Statements:
"If you set this parameter to true, Warehouse Builder generates code for analyzing the target table after the target is loaded if the resulting target table only is double or half its original size."
But if I look in the generated package, DBMS_STATS is performed when the number of records loaded is greater than NUM_ROWS in ALL_TABLES (so greater than when the table was analyzed last).
I'm I missing something or is this a document error?
Jaap.No, you are correct!
Thats a BIG mistake from the OWB developers if you ask me. They know about it since several people opened a TAR regarding this issue.
MB -
Skip table during automatic standby database
We would like to skip a table from being replicated into a standby database.
We do the following on the standby database
startup nomount;
alter database mount standby database;
recover automatic standby database;
and cancel the process.
and then bring the standby database up to date at night for example.
And during the day we would like to use it as a report database, to see if that is possible.
To be able to do that, we do this:
alter database open read only;
But the problem is, there is one reporting table that we do not like to replicate.
We want to create a database link in the standby (report) database, that links to the table in the live database.
Because we need that data from the live database to be update to date in that table.
That table does not contain data that needs to be stored, so it is no problem if it does not end up in the standby report database.
Problem is that we cannot get Oracle to skip to replicate this REPORTPARAM table.
We tried this
execute dbms_logstdby.skip(stmt => 'SCHEMA_DDL',
schema_name => 'ABSSOLUTE',
object_name => 'REPORTPARAM',
use_like => FALSE);
exectue dbms_logstdby.skip(stmt => 'DML',
schema_name => 'ABSSOLUTE',
object_name => 'REPORTPARAM',
use_like => FALSE);
And when we check SELECT * FROM DBA_LOGSTDBY_SKIP
we see the values in there.
But still this table is being replicated.
How can we stop Oracle from doing that?
( And can when we stopped Oracle from doing that, create a database link with alias to the same table in the live database,
that will be the next step. )This is the output from select * from dba_logstdby_skip
ERROR STATEMENT_OPT OWNER NAME USE_LIKE ESC PROC
N SCHEMA_DDL ABSSOLUTE REPORTPARAM N
N DML ABSSOLUTE REPORTPARAM N
N INTERNAL SCHEMA SI_INFORMTN_SCHEMA % N
N INTERNAL SCHEMA APEX_030200 % N
N INTERNAL SCHEMA XS$NULL % N
N INTERNAL SCHEMA ORDPLUGINS % N
N INTERNAL SCHEMA APPQOSSYS % N
N INTERNAL SCHEMA ORACLE_OCM % N
N INTERNAL SCHEMA XDB % N
N INTERNAL SCHEMA WMSYS % N
N INTERNAL SCHEMA DIP % N
N INTERNAL SCHEMA OUTLN % N
N INTERNAL SCHEMA EXFSYS % N
N INTERNAL SCHEMA ANONYMOUS % N
N INTERNAL SCHEMA CTXSYS % N
N INTERNAL SCHEMA ORDSYS % N
N INTERNAL SCHEMA ORDDATA % N
N INTERNAL SCHEMA MDSYS % N
N INTERNAL SCHEMA SYSTEM % N
N INTERNAL SCHEMA SYS % N
N INTERNAL SCHEMA MGMT_VIEW % N
N INTERNAL SCHEMA SYSMAN % N
N INTERNAL SCHEMA DBSNMP % N
The second select however
SELECT APPLIED_SCN, NEWEST_SCN FROM DBA_LOGSTDBY_PROGRESS;
returns no rows. -
Generate table/view automatically from xsd
Hello all,
following requirement: I receive xml files and appropriate xsd. I don't want to parse the xml by hand (e.g. I know of the possibility to create views from xml with extract - extracting elements manually). Is it any possibility to achieve this:
input: xml file with xsd -> automatical processing: something what I don't know -> output: view. How I already mentioned I just know of the possibility to extract the values manually. After a brief search I found DBMS_XMLSCHEMA.registerSchema but I don't know if it helps me. Registering xsd makes the DB know how the xml look like.
Do you have any ideas?
Thank you in advance for your answers. I appreciate any hint.
Kind regards,
Anton>
But you don't have to program element 1 in column 1, element 2 in column 2 etc. It handles it automatically. You just say insert into <your table 1> ds.Tables["table1 from xml"].
>
it's look as
insert into <table_name>
select *
from <some table or view>but
what if table will be altered, say add column
or
what if
select *
from <some table or view>will be return more columns than in <table_name>
you get errors
as for
>
ds.Tables["table1 from xml"]
>
not sure what is work correctly on complex schema with complex type
if you have simple xml
you can try to parse it dynamically:
- parse xml to find list of tags with path
- create script which will be generate script for xml like
select <columns>
from <table>
, xmltable (
<columns>
)then create view on the above script
if your xml structure will be often changing then you must be recreate your script and recreate view
for xml sample from xsd
http://www.codeproject.com/Articles/400016/Generate-Sample-XML-from-XSD -
How to create a unique temp table then automatically remove after the join?
i have many users simultaneously accessing the web apps.
my problem is on how to solve the SELECT WHERE IN('..') clause..
i've read a lot of threads that with the same option..
1) open connection and start transaction
2) create temp table
3) insert the data (batch insert)
4) do the main goal. SELECT JOIN or SELECT WHERE IN(SUBQUERY).
5) end transaction and close connection
how do I assure that the created temp table was remove/drop upon 5) ?
thanks a lot..You can do this using global temporary tables. Also data from temporary table will be automatically deleted after commit but table will remain.
e.g.
CREATE GLOBAL TEMPORARY TABLE today_sales
ON COMMIT DELETE ROWS
AS SELECT * FROM orders WHERE order_date = SYSDATE;
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#i1006400
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153132
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153132
Regards
Rajesh
Edited by: Rajesh on Jun 10, 2010 3:34 PM -
AUTOMATIC UPDATE STATISTICS for VB* tables ON automatically
Hello All,
We had reviewed our ECC system with SAP and they recommended us to OFF the AUTOMATIC UPDATE STATISTICS for VBDATA, VBHDR and VBMOD.
We executed the script EXEC sp_autostats <tablename>, 'OFF' but the status goes ON after a while.
Checked the SAP note 771352 but did not get proper idea from it.
MS SQL database used is 2008.
Can someone suggest and share his/her experience.
Regards,
MohitHi Mohit,
Did you ran the sap_z* script ?
What is your SP level - did you check 1702325 - Alerts appear for VB tables
Also, I asked to to use NORECOMPUTE - have you tried that ?
Regards -
Table Styles - Automatic Format Header (only)
Hi,
I'm trying to set up a Table Style to look like the following
Header A
Header B
Header C
Example 1
XX
XX
XX
Example 2
XX
XX
XX
Example 3
XX
XX
XX
I have the following Paragraph Styles set up:
Header - (Header A, B, C) centre aligned. Bold Arial 10pt
Left Column - (Example 1, 2, 3) Left aligned Arial Regular 10pt
Body - (XX) Centre aligned Arial Regular 10pt
These are linked to Cell Styles in their appropriate places
The Left Column is automatically applied, as is the Body Rows. The problem is that I have to tell the Header to apply the Header Cell Style
Is this possible to automate?
Thanks,If the table was originally a Word doc, the Word table can be set to be a header in Word. This could be honored as it places into the InDesign file.
If the table was originally an Excel file, the Excel file does not have the ability to nominate the top row as header in advance of placing it into InDesign. This creates a manual moment.
Too bad you cannot set the header in the Show Import Options as you place it! This means you are often stopping to manually adjust/nominate the header row manually.
More pain: if you refresh the link to the Excel spreadsheet, you have to reset the header row manually again.
Maybe you can throw a script at it:
Table: convert first row to header rows -
Table analyzed / indexes rebuilt
In data warehouse, we have a contract summarization table. The daily data feed populates this table. It didn't analyzed since 4/25/2007. But its indexes are rebuilt every day when processing data. The questions are:
1. since these indexes are built daily, should we worry about the table performance because the table itself is not analyzed for 3 months?
2. we have a script running each weekend to analyze tables in this database. For some reason, this table didn't get analyzed for 3 months. This table is a very active table and data is changed daily. Any other reasons?
I really appreciate the help if someone can shed some lights.
Jin1. Why are the indexes rebuilt every day? Are they bitmap indexes that are dropped and re-created before/after loads? There is much discussion on the topic of rebuilding indexes many arguing that it is not a necessary excercise, search asktom.oracle.com. If the stats do not reflect what data is in the table then you should gather statistics.
2. Don't know what version you are using and whether you really are using the analyze command but use DBMS_STATS instead.
Maybe you are looking for
-
How can I restore my data from iCal? I didn't make any backup, but I use time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.
-
Is the only way to restore my iphone on itunes?
I can also restart my iphone from Settings and it looks as if it gets the same results. Will restarting my iphone to it's factory settings be like getting a brand new phone? A while ago, I went to my local Apple Store and they used a website that gav
-
Total Net Value is picking automatically into one G/l a/c in posting time
Hi to all, i have one critical issuse , here i am doing new pricing procedure in that i put 4 condition types 80 ZLLU Actual user price ERL 850 Sub Total
-
Hey folks, I just got my iPad 3, and when the display is almost white like on the google homepage i noticed there were small squares or a grid visible all over the screen (when a light is shinning directly on the screen). I just want to know if it is
-
Hi all, When am grouping the infopackages am getting the following message Possible overlapping selection conditions; please check can i proceed with this while batch processing in process chains. Urgent Regards Ashwin Edited by: ashwin kumar on Feb