How to find the size (in MB/GB) of materialized view in Azure Dedicated SQL Pool / Azure Synapse

Sunil P 136 Reputation points
2021-08-10T08:34:02.713+00:00

I want to display list of materialized views in the Database and Size of the physical storage in MB/GB. It would be great if I get some SQL query for the same.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,476 questions
0 comments No comments
{count} votes

Accepted answer
  1. Saurabh Sharma 23,761 Reputation points Microsoft Employee
    2021-08-10T19:40:38.31+00:00

    Hi @Sunil P ,

    Thanks for using Microsoft Q&A !!
    You can use sp_spaceused or DBCC PDW_SHOWSPACEUSED to get the space consumed by a materialized view.
    Results - sp_spaceused
    122000-image.png

    Results - DBCC PDW_SHOWSPACEUSED (space displayed in KB)
    122080-image.png
    Please refer to below documentations for details -

    1. sp_spaceused
    2. DBCC PDW_SHOWSPACEUSED

    Thanks
    Saurabh

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    0 comments No comments

0 additional answers

Sort by: Most helpful