Quantcast
Channel: SCN : Discussion List - SAP on SQL Server
Viewing all articles
Browse latest Browse all 669

How to change my clustered index(clustering key) in SAP on SQL?

$
0
0

Hi experts,

   I have one table in SAP on SQL and I found the junior developer just choose the clustering key carelessly. He chose a lot of key fields and no query used it.

 

Question:  How to change my clustered index(clustering key) in SAP on SQL?

Is the the procedure below work? PS: this table is 61GB right now.

 

  1. Drop nonclustered indexes first
  2. Drop the clustered next(in SSMS, right?)
    • IMPORTANT NOTES: If you're completely changing it you definitely need to drop the nonclustered and then drop the CL. BUT, if you're keeping the name and only changing the definition (and it's NOT a constraint-based index) then you can use WITH DROP_EXISTING. If you use DROP_EXISTING you do NOT need to drop the nonclustered indexes first.
  3. Create the new clustered
  4. Modify SAP DDIC accordingly
  5. Recreate the nonclustered indexes

Viewing all articles
Browse latest Browse all 669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>