cancel
Showing results for 
Search instead for 
Did you mean: 

basic brconnect question

former_member263733
Participant
0 Kudos

brconnect is running as expected. when we look at specific tables in db20 we see tables with dates well into the past - even though db20 shows statistics are currrent.

we are thinking that this date is the the date the method and sample size were evaluated. is this accurate? if so, is there a way to see the date the table was last analyzed?

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

fidel_vales
Employee
Employee
0 Kudos

Hello Jeff,

That is a typical question. When you run "BCONNECT -f stats" you are NOT collecting statistics for ALL tables. BRCONNECT will check the tables that have change "a lot" since last time it was collected stats for it.

the default change threshold is 50% (configurable - parameter stats_change_threshold)

For more information, take a look at the documentation:

[Internal Rules for Update Statistics|http://help.sap.com/saphelp_nw70/helpdata/en/f4/81e93a637bfd70e10000000a11402f/frameset.htm]

stefan_koehler
Active Contributor
0 Kudos

Hello Jeff,

i personally don't use DB20 ... i always look on the corresponding oracle tables via sqlplus:

=> DBA_TAB_STATISTICS

http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4152.htm#sthref2710

=> DBA_TABLES

http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4155.htm#sthref2716

DBA_TAB_MODIFICATIONS

=> http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4149.htm#sthref2703

>> we are thinking that this date is the the date the method and sample size were evaluated. is this accurate?

>> if so, is there a way to see the date the table was last analyzed?

I have traced the access of DB20 ... take a look here:

  • select from dba_tables where owner = 'SAPSR3' and table_name = 'MSEG'

  • select from sys.dba_tab_modifications where table_owner = 'SAPSR3' and table_name = 'MSEG'

  • select from dba_tab_statistics where owner = 'SAPSR3' and table_name = 'MSEG'

So DB20 queries the same tables as i do manually. So the date that you see in DB20 is the last analyzed date. You will see the statistics as current .. as long as no changes are made up to 50%.

You can check this manually by running the following query:

> SQL> select LAST_ANALYZED from ALL_TAB_STATISTICS where TABLE_NAME = '<TABLE>';

Regards

Stefan