Skip to end of banner
Go to start of banner

How to know the memory occupied by tables using SQL for Confluence app

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

This article explains how to get the size of a database tables using SQL for Confluence app.

Instructions

  1. Login to Confluence, navigate to the required page where you want to display the memory information.
  2. Edit the page, and, enter {sql or search for the SQL for Confluence macro.

    You must know the Data source profile name that can be used to run queries given in the following instructions.

    If you do not know which profile name can be used, contact your Confluence Administrator before proceeding.

  3. Edit the macro and select the Data source profile.


  4. In the SQL statement field, provide the below query to display the space occupancy by respective tables in MB.


    In the below example, jira_test1 is the database name and the query is tested on MySql DB.

    SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size (MB)' FROM information_schema.TABLES WHERE table_schema = "jira_test1";				
  5. Click Save settings.

  6. Save your Confluence page and you can see the size of the table as shown:

Refer to this link to know more about database source profiles in Confluence.

  • No labels