2006 Dec 20 7:19 AM
HI GURUS,
I want to know about primary index that how system use it.
Like I am quering a table 'BSAK' which have 10 key fields. And in my query i am mentioning 4 key fields from different locations like 1, 3, 6, and 9 key field. and 1 non key field.
Now what database will do. It will use the primary index or not.
and is it important to mention client field 'mandt' when quering which is also a key field.
Thanks in advance
2006 Dec 20 7:28 AM
hi
though u dont use, you have to all the key fields in the select statement in the order, along with your non-key field. that can work.
pavan
HI GURUS,
I want to know about primary index that how system use it.
Like I am quering a table 'BSAK' which have 10 key fields. And in my query i am mentioning 4 key fields from different locations like 1, 3, 6, and 9 key field. and 1 non key field.
Now what database will do. It will use the primary index or not.
and is it important to mention client field 'mandt' when quering which is also a key field.
Thanks in advance
2006 Dec 20 7:28 AM
hi
though u dont use, you have to all the key fields in the select statement in the order, along with your non-key field. that can work.
pavan
2006 Dec 20 7:32 AM
Hi,
The query will work fine. No problem in that.
And u do not have to mention 'MANDT' field in query.
Rgds,
Prakash
2006 Dec 20 7:39 AM
HI Mehra,
Question is not about query will work fine or not. But i want to know that if system will use the primary index for searching of record or not.
If we have 10 key fields and we mention 4 or 5 key fields and a non key field.
system will use the primary index or not????
Thanks
2006 Dec 20 7:32 AM
Hi,
As per my knowledge, if we have 10 fields as primary keys, index is going to maintain for the composite primary key, if you specifiy all primary keys in your select statement data retrival will be very fast because it going to find what is the exact record for composite key, other wise it is going to check all the records matching to your where condition and retrive all this will cause major performance issue.
2006 Dec 20 7:46 AM
Hi ,
No . It wont use Primary Index . It will search all the records .
If we want to increase the performance we can create secondary index
using those 4 fields alone .
Regards ,
Senthil
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |