web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

reg SQL tuning of InventTable records

(0) ShareShare
ReportReport
Posted on by 26
Hello Experts,
 
I am seeking help to optimize SQL fetch on InventTable.
 
We have a customer with considerable volume of data (278K records) who is facing Performance issues in Sandbox (SBX) and Prod.
After restoring SBX into DEV, we found that it takes approximately 50 seconds to a minute to fetch 278K records.
 
While researching across the internet and AI tools, we found below details:
• Verify indexes and statistics status on InventTable.
• Confirm fragmented indexes and outdated statistics can cause slower query execution.
• Recommended performing index health checks and updating statistics on product-related tables.
 
As part of Query tuning, we continued our analysis with below points:
• Investigated Item master performance using SQL traces and by commenting dependent logic to isolate problem areas.
• Checked SQL execution plan to identify costly operators, table scans, or lookups contributing to slowness.
• Verified overall space utilization of InventTable using sp_spaceused (row count, data size, index size, unused space).
• Checked index fragmentation with sys.dm_db_index_physical_stats.
• Analyzed column-level data size to identify fields consuming more space and contributing to slower performance.
 
Apart from reviewing existing Clustered indexes on InventTable, is there any other way to speed up SQL fetch?
 
 
Thank you.
Arun
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    298,251 Super User 2025 Season 2 on at
    reg SQL tuning of InventTable records
    Hi Arun,
     
    Can you tell more about the process? What exactly are you executing? Why do you need to fetch 278K records at a time?
    Do you have could instances or are you on-premises?
  • Martin Dráb Profile Picture
    236,093 Most Valuable Professional on at
    reg SQL tuning of InventTable records
    First of all, you must realize that you want to optimize a particular query, not a table. You need to identify the query before you can use the steps above, such as reviewing the execution plan, checking indexes on tables used in query etc.
     
    There aren't clustered indexes on a table, there may be just one. But maybe the query has nothing to do with the clustered index at all and therefore talking about it won't help you.
     
    Regarding maintenance of indexes and statistics, that's something you should be doing in any case.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 575

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 245 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 187 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans