How to find the memory consumed by database tables using SQL for Confluence app

This article explains how to find the memory consumed by the database tables using the SQL for Confluence app.


  1. Log in 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 needs to be used to run queries given in the following instructions. 
    If you do not know which profile name to 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 disk space consumed 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.

Find answers from the community.

Ask a question to the community.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2022 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.