Missing Indexes in Database
Hi,
In tcode DB02, when seeing database statistics, i found that there were some missing indexes in database. ie., for some tables there are no indexes created.
Please tell me whether we need to create indexes or not. Is there any serious effect of a table not having any index?
Please suggest me a good solution for this.
Thanks,
Sailesh K
Not necessarily. You must decide if an index will assist in making a table scan faster. FULL table scans indicate that an index is not available. Creating an index in this case, will improve preformance and prevent full table scans from occuring.
Also, check oracle to see if the index exists. Somestimes the Data Dictionary is unaware of the index due to how it ws created.
In summary missing indexes are not a problem. FULL table scans are problems and require new indexes to be created for performance reasons.
Hope this helps.
Similar Messages
-
Hi,
When I go to DB02->Diagnostics->Missing Tables and Indexes in our ECC6 system.
I see some missing primary and secondry indexes there.I also see option " Create on Db" there.
Please suggest should I create such indexes by option "Create in Db" and also suggest how SAP find out such missing indexes in Database,,, Does CheckkDB or Update stats provide this information to SAP.
Please confirm.
Regards,
Shivam>
Shivam Mittal wrote:
> Hi,
>
> When I go to DB02->Diagnostics->Missing Tables and Indexes in our ECC6 system.
>
> I see some missing primary and secondry indexes there.I also see option " Create on Db" there.
>
> Please suggest should I create such indexes by option "Create in Db" and also suggest how SAP find out such missing indexes in Database,,, Does CheckkDB or Update stats provide this information to SAP.
>
> Please confirm.
>
> Regards,
>
> Shivam
Yes you can create them on DB.
SAP doesnt find out that information until and unless then login into ur system through saprouter.
Regards,
Nirmal.K -
Indexes missing in the database
hello gurus
Missing indexes. Check of 23.04.2007 20:11:16
Indexes missing in the database
Primary indexes 0
Secondary indexes 6
/BIC/F100067-160
/BIC/F100067-150
/BIC/F100067-140
/BIC/F100067-130
/BIC/F100067-120
/BIC/F100067-110
This is my problem, I am facing in my database, can somebody help me to understand what is Primary indexes, Secondary indexes in the database
whether they critical or non critical, what is the process so that we can rectify the
indexes ?
Waiting for your reply
Thank YouHI Shishir,
<b>Here are the definitions for the following :</b>
<b>Missing indexes</b> may occur if you ignore an error message when creating a table (table created, index not created) or if an index is deleted. The latter case may occur during an incorrect reorganization.
<b>Difference between Primary and Secondary Index:</b>
<b>Primary indexes</b> (ending with 0) ensure that the line keys (row keys) are unique. Missing primary indexes are therefore a critical problem.
<b>Secondary indexes</b> (ending with 0) are used for particular scans and are only important for performance.
To analyze the above use T-code DB02
Regards
<b>Vijay Kothapalli</b> -
Problem about Indexes missing in the database
Dear all,
We found a missing index in DB02 view of our sap system.
This missing index is a Secondary index,
and its name is S509-VAB.
We tried to create it in DB, but got below error log as below:
Index S509~VAB could not be set up in the database
Message no. DI 006
Diagnosis
It was not possible to create the index in the database.
This could be caused by the fact that an index with the same name exists in the database, but it is unknown to the ABAP/4 Dictionary. Activating the index in the ABAP/4 Dictionary is possible, but it is not possible to create it in the database.
Procedure
For more information about the cause of the error, analyze the SQL error messages in this log.
Our question is How to Activate the index in the ABAP/4 Dictionary?
Anyone experienced,
Please kindly give advice.
Regards,
AllenHi Allen,
S509 is an information structure table. Data is populated into it post we do some necessary cutomizing and is mainly used for reporting purpose. I do not know what reports you are generating out of this. Hence difficult to say whether you can ignore this missing index or not.
I would suggest you to do the following
In se14, type the table name S509.
Go to indexes tab. Look for the list of indexes defined.
Select the index name VAB ( Which is missing in your case ).
1) check the status of this index ? Does it says "exists in database"
2) If point 1 is not valid then , select the option create in database button and create the index in the database.
Regards,
Deepak Kori -
Dear all,
This is about a BW 3.5 system running Oracle 10.2.0.2 on Solaris 10
After an online database reorganisation, I receive these messages in db13
BR0970W Database administration alert - level: ERROR, type: MISSING_INDEX, object: (table) SAPR3./BI0/F0BWTC_C02
BR0970W Database administration alert - level: ERROR, type: MISSING_INDEX, object: (table) SAPR3./BI0/F0BWTC_C05
According to the logs, the tables above have been reorganised successfully.
I see the missing indexes in db02 under Missing Indexes:
Secondary indexes 13
/BI0/F0BWTC_C02-070
/BI0/F0BWTC_C02-060
/BI0/F0BWTC_C02-050
/BI0/F0BWTC_C02-040
/BI0/F0BWTC_C02-020
/BI0/F0BWTC_C02-010
/BI0/F0BWTC_C05-070
/BI0/F0BWTC_C05-060
/BI0/F0BWTC_C05-050
/BI0/F0BWTC_C05-040
/BI0/F0BWTC_C05-020
/BI0/F0BWTC_C05-010
/BIC/FZ_CPLN_00-900
If I try to select one and click on create in db, I get a short dump
Runtime Error RAISE_EXCEPTION
Date and Time 23.08.2007 11:12:13
ShrtText
Exception condition "STORAGE_NOT_DETERMINATED" raised.
What happened?
The current ABAP/4 program encountered an unexpected
situation.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
Error analysis
A RAISE statement in the program "SAPLSDB2" raised the exception
condition "STORAGE_NOT_DETERMINATED".
Since the exception was not intercepted by a superior program
in the hierarchy, processing was terminated.
173 else.
174 storage_source_hierarchy-dbr = 'X'.
175 endif.
176 storage_source_hierarchy-cmt = 'X'.
177 storage_source_hierarchy-cmp = 'X'.
178 if dbtabname ne space and dbtabname ne tabname.
179 perform shdupg_get_index_storage tables storpar
180 using dbsys prid tabname indexname storage_source_hierarchy
181 dbindex_of_origtable dbprimindex_of_origtable
182 changing rc.
183 else.
184 call function 'DB_STORAGE_GET'
185 exporting
186 dbsys = dbsys
187 prid = prid
188 tabname = tabname
189 indexname = indexname
190 dbindex = realname
191 dbrefindex = name_of_primidx
192 source_hierarchy = storage_source_hierarchy
193 tables
194 storpar = storpar
195 exceptions
196 mapping_error = 1
197 db_error = 2
198 uncomplete_parameter = 3
199 others = 4.
200 rc = sy-subrc.
201 endif.
202 if rc ne 0.
>>>> raise storage_not_determinated.
204 endif.
205
206 * Progamm generieren
207 perform db_get_progname using 'SDB2F' dbsys changing sdb2fdbs.
208 refresh statements.
209 perform gen_create_index in program (sdb2fdbs)
210 tables ddfldnames storpar loc_stmt
211 using tabname indexname realname unique dbsys rc.
212 if rc <> 0.
213 *KUGL-protocol-270694
214 perform stdo_sam1
215 using prid max_severity msgid '122' realname.
216 raise program_not_generated.
217 endif.
218 statements[] = loc_stmt[].
219
220 perform create_index_finish tables loc_stmt
221 using tabname realname dbsys no_exec rc.
222 if rc <> 0. raise program_not_generated. endif.
Any ideas?
Many thanks
AndreasHi,
Please check following note:
Note 703304.
You may have to import correction against your release.
Regards,
Payal Patel -
Missing indexes after system copy
Hi All
we have around 70,000 missing indexes after the system copy
offline export from
source with sun solaris oracle
To
Linux oracle
but these appeared after we Run SGEN , which took 60 hours for a 200 Gb database.
and target system response is also slow , how to go ahead with this issue
we have checked export and import logs , none of the packages were missed
1 Why these missing indexes after SGEN , and why SGEN for 60 hours
2 when we check the Tables which appeared in Missing indexes ,from SE14 it says In Consistency with Data dictionary
3 and the other error , is Index Missing in the database ,
4 but we cant create all these manually.
RegardsHi Matt
Thanks for the response
After sap suggestion , we have done only import again, with 721 R3load same as export.
but still the R3load.exe.log of import shows as done with 720 kernel.
import R3load.exe log //bas/720_REL/src/R3ld/R3load/R3ldmain.c#
export R3load.exe log //bas/721_REL/src/R3ld/R3load/R3ldmain.c#10 $ SAP
But when we compare the sapinst_dev and AGR logs both from export and import
both are referring the same 721 R3load version ,
//bas/721_REL/src/R3ld/R3load/R3ldmain.c
still we have same missing indexes issue , after we did the import again.
Are we making any mistakes in export , Any suggestions are welcome
hi all , kindly respond with your inputs , on this
Regards -
Hi Gurus!
I have a critical problem to solve.
I have a table without data which is inconsistent because it doesn't have the primary index. When i see missing indexes at DB02, the system tells me that the index is created, but when i go to SE14 and select the primary index, it says the index does not exists on the database and the only option that is active is the one to create the index. If I try to create the index, i get an error saying: there is already a an object named 'zmed_distr~0' ( my index name ).
Can anybody help me?
Thank you in advance.the tsystem does'nt create the index and give me this log:
Request: Create Index ZMED_DISTR-0 (FORM05/11.12.07/19:06)
Process: BLADE04_0
sql:
ALTER TABLE [ZMED_DISTR]
ADD CONSTRAINT [ZMED_DISTR~0]
PRIMARY KEY CLUSTERED
( [MANDT] ,
[ZUONR] ,
[GJAHR] ,
[KUNNR] ,
[ESTAB] ,
[TXT20] ,
[REPS] )
There is already an object named 'ZMED_DISTR~0' in the database.Could
not create constraint. See previous errors.
DDL time(___1): .........3 milliseconds
The SQL statement was not executed
Index could not be created completely in the database
Index ZMED_DISTR-0 could not be created
Request for ZMED_DISTR could not be executed -
In - DB13 - warnings for missing indexes
Hi
I've noticed in the results of the DBCHECK job in DB13 that we have a number of warnings for missing indexes.
BR0970W Database administration alert - level: ERROR, type: MISSING_INDEX, object: (table) SAPR3./BI0/PCOSTELMNT
The strange thing is that no missing indexes are picked up be DB02. In SE11 these tables cannot be found. Checked at Oracle level and the tables exist but the indexes do not.
Does anyone know if these tables should have indexes?
If so what would be the best way to create these?
Thanks & Regards
ShishirIn DB02 they are probably showing under 'Optional Indexes' under 'not created'
-
Hi All,
We have a Database with many tables using foreign keys. Some of my queries from coldfusion are slow. We are using 11g version.
It's a way to check for missing indexes?
I would like to help the database to perform better, I know this is a huge topic but as new in oracle I need to start somewhere.
Any links or comments will be appreciate it.
Regards
Johnnyi have created a two step process for finding which Foreign key is not indexed
1. create a table having the ddl of all indexes
CREATE TABLE INDEX_TXT_TBD AS
SELECT DBMS_METADATA.GET_DDL('INDEX',INDEX_NAME) TXT FROM USER_INDEXES WHERE INDEX_TYPE='NORMAL' AND INSTR(INDEX_NAME,'$') = 0
2. create a table which will tell the tablename, columnname (FK) who are not indexed
CREATE TABLE INDEX_TBD AS
select distinct
user_cons_columns.TABLE_NAME,
user_cons_columns.COLUMN_NAME
from
user_cons_columns,
user_constraints,
INDEX_TXT_TBD,
where
user_constraints.CONSTRAINT_NAME=user_cons_columns.CONSTRAINT_NAME
and CONSTRAINT_TYPE='R'
AND INSTR(TXT,'"' || user_cons_columns.TABLE_NAME || '" ("' || user_cons_columns.COLUMN_NAME || '")') = 0 -
I find a missing Index when I do Database check
This is the error message:
"BR970W Database administration alert - level: ERROR, type: MISSING_INDEXES, object: (table) SAPR3.ZGMM0015"
I executed Trx. DB02 - Missing Indexes - there I find
--> Index missing under database
--> primary index - 1
--> Z..... --> I selected this and clicked on "Create in DB".
Then it pops up a dialog box asking options like Online, Background .... (can I create this Index online)
from here what I needs to do.
Gurus can some one guide me.
Thanks in advanceLooks like index is missing for the table.. When you get options like online, background, you may use online. It does not hamper the system.
-
Missing Index there Unknown indexes in ABAP Dictionary in DB02
Dear All,
I am getting error in T-code DB02 >Missing Index there Unknown indexes in ABAP Dictionary.
Please find the following details.
Unknown indexes in ABAP Dictionary
DB indexes 11
MARA_MEINS
MARA_ZER
MCHA_VFDAT
VBRP_ARKTX
VBRP_CHARG
VBRP_FKIMG
VBRP_KZWI1
VBRP_MATKL
VBRP_MATNR
VBRP_SPART
VBRP_WERKS
Please suggest how to correct them and can caution we have to take before creating the
Index.
The process creating the index form se11 table and there index>database utility and than create .The same process can be use .
Regards,Hi,
Please use the below procdure:
- Goto transaction SE11
- Enter table name and press view
- Click button "Indexes..."
Please alse check with the below links for more information.
Index:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb20446011d189700000e8322d00/content.htm
Creating Secondary Index
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/1c/252640632cec01e10000000a155106/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/c7/55833c4f3e092de10000000a114027/frameset.htm
Check with this also......[click here|Steps for creating a database index;.
With Regards,
Krishna. -
Hello,
Checking DB02 i've found a list of missing primary indexes. I know that i can use SE14 to adjust the indexes but i found some decumentation that says that i should first check if double index for the primary index exist and elimenate them.
Please Advice.
David.hi David,
oss note 157918
BW: DB02 shows "missing indexes"
Symptom
DB02 shows indexes of a fact table to be missing. Such indexes have names that start with prefixes /BI0/F or /BIC/F (BW 1.2, BW 2.x) or /BI0/E or /BIC/E (BW 2.x only).
Additional key words
Business Information Warehouse, InfoCube, Fact Table, Bitmap Indexes, Oracle, DB02, Unique Index
Cause and prerequisites
For BW 1.2, this only applies to Oracle-based systems. For BW 2.x, this might apply to any DB-platform.
BW 1.2 and BW 2.x take advantage of certain DB-specific features which are not supported by the data dictionary of R/3 4.0, 4.5 or 4.6 base systems. Prominent examples are bitmap indexes on fact tables (Oracle-based BW systems), partitioned/fragmented indexes, nologging and parallel index building facilities etc. Such features are used in BW by triggering native SQL statements which bypass the data dictionary.
While all these features improve performance of the BW system, there are, however, some other transactions that are also affected when the data dictionary is bypassed. Amongst these is DB02. It sometimes claims that certain indexes of infocube fact tables are missing while direct checks on the database level show that those indexes are not missing at all or substituted by equivalent indexes. The latter might happen in BW 2.x where the primary index on fact tables might be replaced by a non-unique index or simply skipped as it is not required. Therefore you can usually ignore those messages. Obviously, we are currently working on removing such inconsistent information. If you want to be sure on the indexing then check the solution section of this note.
Solution
For BW 1.2A systems (Oracle only):
You have to ask your local DBA to check the state of the indexes directly by looking at the USER_INDEXES table on the Oracle database.
For BW 1.2B systems (Oracle only):
There are two alternatives to check the secondary indexes of infocube and aggregate cubes fact tables:
(1) Go to the Admin Workbench. Go to the infocube. Click the right mouse button and choose "InfoCube Performance". This leads you to a screen that shows the state of those indexes via traffic light semantics. There are also buttons to repair inconsitent states of the indexes.
(2) Use transaction RSRV. Go to the tabstrip "Database". Choose the item "Indices of an InfoCube and its aggregates" and insert the (technical) infocube name (e.g. 0BWTC_C01) in the input box at the bottom of the screen. Press F8 ("Analysis") and wait until a red, yellow or green light appears beside "Indices of an InfoCube and its aggregates", i.e. in the "Result" column. Then press F6 ("Results") in order to see a detailed report on the index situation of that cube.
(3) Go to SE37 and do a "single test" for the function module RSDU_CHECK_SECONDARY_INDEXES. Use the infocube's technical name (e.g. 0BWTC_C01) as the input parameter and 'X' for both, the I_COMPLETE_CHECK and I_WITH_AGGREGATES, parameters. Press F8 to run the module. Only the C_T_INDEX output parameter is relevant. It shows a list of indexes. Check the TYPE and STATUS columns. These should show 'BITMAP' and 'VALID' respectively.
For BW 2.0A systems (all DB-platforms):
For checking secondary indexes on individual infocubes the following methods can be applied, similar to the BW 1.2B solution:
(1) Go to the Admin Workbench. Go to the infocube. Click the right mouse button and choose "Manage". Choose the tabstrip "Performance". This leads you to a screen that shows the state of those indexes via traffic light semantics. There are also buttons to repair inconsitent states of the (secondary) indexes.
(2) same as (2) for BW 1.2B.
(3) Go to SE37 and do a "single test" for the function module RSDU_INFOCUBE_INDEXES_CHECK. Use the infocube's technical name (e.g. 0BWTC_C01) as the input parameter, leave the I_FACTTAB initial, use 'X' for both, the I_COMPLETE_CHECK and I_WITH_AGGREGATES, parameters and use 'U' in the I_DOUBLE_FACTTAB parameter. Press F8 to run the module. Only the C_T_INDEX output parameter is relevant. It shows a list of indexes. Check the TYPE_CHECK, UNIQUE_CHECK, PARTITIONED_CHECK and STATUS_CHECK columns. These should show 'G' (= "green" = ok) respectively.
If your BW 2.0A system is on patch level 11 Make DB02 consistent by running the report SAP_UPDATE_DBDIFF (via SE38), go to DB02 and press the "Refresh" button in order to synchronise the information in DB02 with the DBDIFF table. This should provide you with a consistent view.
For BW 2.0B and BW 2.1C systems (all DB-platforms):
DB02 should work consistently in BW 2.0B / BW 2.1C with infocubes created in 2.0B / BW 2.1C. If you wish, you can still use the BW 2.0A approach. For infocubes that were created in BW 2.0A or BW 1.2 you need to adjust the index setup (on the facttables) by running the report SAP_INFOCUBE_INDEXES_REPAIR. The latter is available from BW 2.0B patch 3 onwards. It should be run in a background process as it might take a while to run through.
You also might want to run the report SAP_UPDATE_DBDIFF once in order to update the table DBDIFF that lists database objects whose data dictionary setting do not correspond to the actual setup and that should therefore be omitted in DB02 checks.
Source code corrections -
Update statistics / missing index
The performance has been downgraded after the DB migration... The Query seems running slower than it used to be,
How can I update statistics / find missing index to fix it in Oracle?hi....
after the importing of the db please run the compilation script below
SET HEAD OFF
SET FEEDBACK OFF
SET PAGESIZE 0
SPOOL COM.SQL
SELECT 'ALTER '|| OBJECT_TYPE||' '|| OBJECT_NAME ||' COMPILE ; ' FROM
USER_OBJECTS
WHERE STATUS = 'INVALID'
AND OBJECT_TYPE != 'PACKAGE BODY'
ORDER BY OBJECT_TYPE
SELECT 'ALTER PACKAGE '|| OBJECT_NAME ||' COMPILE BODY ; ' FROM USER_OBJECTS
WHERE STATUS = 'INVALID'
AND OBJECT_TYPE = 'PACKAGE BODY'
ORDER BY OBJECT_TYPE
spool off
@com.sql
SET HEAD ON
SET FEEDBACK ON
SET PAGESIZE 100
this will compile database objects such as packages, functions and rebuilds indexes
regards,
steved -
Hi,
is there any way to create a missing index from DBACOCKPIT as old DB02 on Oracle, MSSQL, DB2, ecc.? I'm not able to find it
Thank you.Hi.
The rebuild of an index is done by the DDIC transactions on all the other platforms, too. There is a link in the DBA Cockpit to this feature but this is only working for the local system (or maybe if an RFC-connection is provided which is not used in most remote monitoring cases). The remote monitoring using just a database connection which is the default for all database platforms since approx 10 years, is not able to recreate an index on a remote system. The code for the missing tables and index check in the DBA Cockpit is DB independent to a very large extent. You can check if creating an index in the DBA Cockpit works on the local system for ASE, too. I don't have a system to check at hand (vacation). On ASE we have the goal to offer all features in the Cockpit for both remote and local databases with the same feature set without using RFC as the remote system might not be running ASE. And the DDIC check is so far the only screen that does not work this way. Unfortunately this cannot be changed without a huge redesign of the DDIC.
Regards,
Jan -
Vat u do when u find missing indexs as Basis guy.
Hello Gurus,
This question has been asked in an interview, and answer my friend gave
1q) vat u do when u find missing index as Basis guy.?
A) He said he will locate the program table associated with it and let the programmer know about it,
especially if it is a Zprogram
to create an index on this. or if a programmer/ABAPEr creates a ticket for basis basis team will take care.
i know for sure depending on the role ABAER or Basis also create an index.
2q) how do u create index
A) thru se11
3) y not thru oracle database
A) SAP recommends not to touch objects at database leve (select be ok )
After these questions my friend got doubt itseems for obvious reasons.
Please let me know ur comments insights into this. .
Regards
vkHi,
Look at SAP Note 912620 - FAQ: Oracle indexes
you get answers for your query.
regards,
kaushal
Maybe you are looking for
-
TS2002 my mac pro takes a long time to start up!
i had my mac pro for less than a year. i updated it to lion. now, my mac heats up very fast, the fans won't stop running, and my startup seems to get slower and slower
-
New iPod Classic 160 GB not read by MacBook
My new iPod Classic 160 GB is not read by my MacBook. It doesn't show up in Finder or in iTunes. What can I do so my computer recognizes it?
-
Apple TV2 wont shuffle playlists?
Some of my playlists dont shuffle on apple tv, it says 'no content found'?
-
I am using Aperture 3 on Lion and an iPad 1 connected via the latest version of iTunes. The issue I am having is that individual photos out of my projects will not sync onto my iPad. I have generated previews of different sizes, I have repaired the m
-
Raw Fine Tuning 2.0 not available?
I'm using the Trial version of Aperture 2.1.2 and tried editing FujiFilm FinePix S2 Pro raw images. For Raw Fine Tuning, only versions 1.0 and 1.1 could be selected (and thus sliders such as "Recovery" are unavailable). I did a Software Update (which