Hi @Advika Sinha
Thank you for reaching out regarding the performance challenges you're experiencing with large tables in your Azure SQL Database. Working with datasets exceeding 10 million rows can indeed
1. Index Optimization
Ensure clustered indexes are used effectively, especially on primary keys.
Use non-clustered indexes for frequently queried columns.
Consider covering indexes to reduce key lookups.
Avoid excessive indexing, as it can slow down write operations.
2. Partitioning & Columnstore Indexes
Partition large tables based on date or category to improve query efficiency.
Use Clustered Columnstore Indexes for analytical workloads to reduce storage and improve performance.
3. Query Optimization
Optimize JOINs by ensuring indexed columns are used in join conditions.
Use query hints like OPTION (HASH JOIN) or OPTION (MERGE JOIN) when appropriate.
Avoid SELECT *—instead, retrieve only necessary columns.
4. Scaling Considerations
Moving to Premium or Hyperscale tiers can significantly improve performance by providing more CPU and memory.
Hyperscale is ideal for very large databases with dynamic scaling needs.
5. Monitoring & Analysis
Use Query Store to analyze slow queries and execution plans.
Monitor sys.dm_exec_query_stats for high CPU-consuming queries.
Leverage Azure SQL Database Advisor for automated tuning recommendations.
Please go through these Documentations that might help you:
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.