2007 Dec 12 11:23 AM
hi
how can i know the index, which was used in the report.
ex: i developed one report on sto's
i want to know which index used in mseg table
explain briefly
Regards
Anand
hi
how can i know the index, which was used in the report.
ex: i developed one report on sto's
i want to know which index used in mseg table
explain briefly
Regards
Anand
2007 Dec 12 11:32 AM
hi
Go to MSEG table, there you can find 'INDEXES' button. Press that. You can find list of all indexes. Check with that. You can get wanted one.
Reward if it dose
Thanks
Siva Kumar
2007 Dec 12 11:33 AM
Hi
The index to be used is triggered automatically by the system and it depends how the WHERE conditions are written, i.e. it depends on the order of the fields:
SELECT * FROM MSEG WHERE MBLNR =
AND MATNR =
AND WERKS =
If there's the system'll try to use an index with the fields MBLNR/MATNR/WERKS else a index with fields MBLNR/MATNR else an index with MBLNR.
If there's a index with fields MBLNR/WERKS it can use only if it re-writes the select:
SELECT * FROM MSEG WHERE MBLNR =
AND WERKS =
AND MENTR =Max
2007 Dec 12 1:48 PM
The index is used per SELECT statement, not per report or table.
The information is not available on the application server only on the database,
i.e. you must trace the execution with the SQL Trace and the explain connects to the db and shows the index.
In most cases the index is used, which you would expect to be optimal, but sometimes not.
How to use the SQL trace can be found here:
/people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy
Siegfried