<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>index &#8211; SAP EWM Help</title>
	<atom:link href="https://www.sapewmhelp.com/question-tag/index/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sapewmhelp.com</link>
	<description>SAP EWM questions answered by experts — ABAP, S/4HANA, warehouse management</description>
	<lastBuildDate>Sun, 24 Aug 2025 11:28:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>Types of Database Indexes in SAP</title>
		<link>https://www.sapewmhelp.com/question/types-of-database-indexes-in-sap/</link>
					<comments>https://www.sapewmhelp.com/question/types-of-database-indexes-in-sap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Sun, 24 Aug 2025 11:28:54 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=types-of-database-indexes-in-sap</guid>

					<description><![CDATA[1. Primary Index Created automatically when you create a table in SE11. Based on the primary key fields of the table. Always unique. Cannot be deleted. Used whenever you do a SELECT ... WHERE on the primary key.  Example:For table MARA, the primary index is on MATNR (Material Number). SELECT * FROM mara WHERE matnr [&#8230;]]]></description>
										<content:encoded><![CDATA[<h5>1. <strong>Primary Index</strong></h5>
<ul>
<li>
<p>Created <strong>automatically</strong> when you create a table in SE11.</p>
</li>
<li>
<p>Based on the <strong>primary key fields</strong> of the table.</p>
</li>
<li>
<p>Always <strong>unique</strong>.</p>
</li>
<li>
<p>Cannot be deleted.</p>
</li>
<li>
<p>Used whenever you do a <code>SELECT ... WHERE</code> on the primary key.</p>
</li>
</ul>
<p> Example:<br />For table <strong>MARA</strong>, the <strong>primary index</strong> is on <code>MATNR</code> (Material Number).</p>
</p>
<p>SELECT * FROM mara WHERE matnr = &#8216;MAT001&#8217;.</p>
</p>
<h5>2. <strong>Secondary Index</strong></h5>
<ul>
<li>
<p>Created <strong>manually</strong> in SE11 (or SE14) for performance optimization.</p>
</li>
<li>
<p>Can be <strong>unique</strong> or <strong>non-unique</strong>.</p>
</li>
<li>
<p>Useful when you frequently query on <strong>non-primary key fields</strong>.</p>
</li>
<li>
<p>Stored in the database dictionary as <code>Z</code> indexes (<code>MARA~Z01</code>, etc.).</p>
</li>
<li>
<p>Too many indexes = bad performance on <code>INSERT/UPDATE/DELETE</code> (because index maintenance consumes resources).</p>
</li>
</ul>
<p>Example:<br />If you often query MARA by <code>MTART</code> and <code>MBRSH</code>, you might define a <strong>secondary index</strong> on those fields.</p>
<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary">
<div class="sticky top-9">
<div class="absolute end-0 bottom-0 flex h-9 items-center pe-2">
<div class="bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs"></div>
</div>
</div>
<div class="overflow-y-auto p-4">SELECT * FROM mara WHERE mtart = &#8216;FERT&#8217; AND mbrsh = &#8216;M&#8217;.</div>
</div>
<div></div>
<div>
<h5>3. <strong>Unique Index</strong></h5>
<ul>
<li>
<p>Ensures that <strong>no duplicate values</strong> exist for the indexed fields.</p>
</li>
<li>
<p>Primary indexes are always <strong>unique</strong>, but you can also define unique secondary indexes.</p>
</li>
</ul>
<p>Example:<br />On <code>MARC</code>, you might create a <strong>unique secondary index</strong> on <code>(MATNR, WERKS)</code> to ensure material–plant combination is unique.</p>
</div>
<h5>4. <strong>Non-Unique Index</strong></h5>
<ul>
<li>
<p>Allows <strong>duplicate values</strong> for the indexed fields.</p>
</li>
<li>
<p>Used mainly for improving performance, not data consistency.</p>
</li>
</ul>
<p>&nbsp;</p>
<h3 data-start="1842" data-end="1889">5. <strong>Bitmap Index (special, DB-dependent)</strong></h3>
<ul>
<li>
<p>In <strong>SAP on Oracle</strong>, bitmap indexes may be created automatically for fields with <strong>low cardinality</strong> (few distinct values, e.g., &#8220;Gender&#8221;).</p>
</li>
<li>
<p>Rarely created manually in ABAP Dictionary, but worth knowing.</p>
</li>
</ul>
<p>&nbsp;</p>
<p>Summary table:</p>
<table>
<thead>
<tr>
<th>Index Type</th>
<th>Created By</th>
<th>Based On</th>
<th>Uniqueness</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Primary</strong></td>
<td>Auto</td>
<td>Primary Key</td>
<td>Unique</td>
<td><code>MARA~MATNR</code></td>
</tr>
<tr>
<td><strong>Secondary</strong></td>
<td>Manual</td>
<td>Any fields</td>
<td>Unique / Non-Unique</td>
<td><code>MARA~Z01</code> on MTART+MBRSH</td>
</tr>
<tr>
<td><strong>Unique</strong></td>
<td>Manual</td>
<td>Any fields</td>
<td>Unique only</td>
<td><code>MARC~MATNR+WERKS</code></td>
</tr>
<tr>
<td><strong>Non-Unique</strong></td>
<td>Manual</td>
<td>Any fields</td>
<td>Duplicates allowed</td>
<td>Index on <code>MTART</code></td>
</tr>
<tr>
<td><strong>Bitmap</strong></td>
<td>DB-specific</td>
<td>Low-cardinality fields</td>
<td>Depends</td>
<td>Oracle-specific</td>
</tr>
</tbody>
</table>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/types-of-database-indexes-in-sap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
