How to improve query performance in Azure SQL Database with large datasets?

Advika Sinha 20 Reputation points
2025-06-11T16:59:34.1466667+00:00

Hi everyone,

I'm working with an Azure SQL Database that contains a few large tables (over 10 million rows each), and I'm noticing performance issues when running complex joins and aggregations.

I've already implemented indexing on the commonly queried columns, but some queries still take too long. I'm using the Standard S3 tier.

Could you please guide me on:

Best practices to optimize query performance in Azure SQL Database for large datasets?

Whether moving to a higher tier (like Premium or Hyperscale) would help significantly?

How to monitor and analyze slow queries more effectively in Azure?

Any tools or approaches specific to Azure that you'd recommend would be really helpful.

Thanks in advance!

Azure SQL Database
{count} votes

Accepted answer
  1. Sai Raghunadh M 4,120 Reputation points Microsoft External Staff Moderator
    2025-06-11T17:53:37.0566667+00:00

    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:

    https://learn.microsoft.com/en-us/azure/azure-sql/database/query-performance-insight-use?view=azuresql

    https://techcommunity.microsoft.com/blog/azuredbsupport/lesson-learned-481-query-performance-analysis-tips/4088795

    https://www.sqlservercentral.com/articles/azure-sql-performance-tuning-mastering-indexes-partitioning-and-clustered-columnstore

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.