コミュニティアチーブメントバーを展開する。

解決済み

How to find size of a schema (table) in Adobe Campaign Classic V7 in console

Avatar

Level 4

Hi Team,

 

I want to know how to find the size of a schema (table) in Adobe Campaign Classic v7 via Console. Please let us know if there is any possibility to find out the size directly in the Campaign Console instead of checking it in the Control Panel.

 

Thanks,

Raviteja Gundu

トピック

トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hello @ravitejagundu ,

i think there is no dashboard to show you table space. But if your user can run SQL commands you can create your own dashboard in email or webapp, with use of sqlSelect JSAPI function https://experienceleague.adobe.com/developer/campaign-api/api/f-sqlSelect.html

 

To find the size of a table in e.g. PostgreSQL db engine, you can use the following SQL query:

 

 

SELECT pg_size_pretty(pg_total_relation_size('your_table_name'));

 

 

 

Replace 'your_table_name' with the actual name of the table you want to find the size of.

This query will return the size of the table in a human-readable format, such as "23 MB" or "1 GB". The pg_total_relation_size function returns the total size of the table including all indexes and associated objects, and pg_size_pretty formats the size in a readable format.

 

In Adobe Campaign JS  you can do

 

 

var res = sqlSelect("table,@size:number",
        "SELECT pg_size_pretty(pg_total_relation_size('nmsGroup'))")
logInfo(res.table.@size)

 

 

 

>> 04/06/2023 4:55:16 AM js 160 kB

 

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

元の投稿で解決策を見る

2 返信

Avatar

正解者
Community Advisor

Hello @ravitejagundu ,

i think there is no dashboard to show you table space. But if your user can run SQL commands you can create your own dashboard in email or webapp, with use of sqlSelect JSAPI function https://experienceleague.adobe.com/developer/campaign-api/api/f-sqlSelect.html

 

To find the size of a table in e.g. PostgreSQL db engine, you can use the following SQL query:

 

 

SELECT pg_size_pretty(pg_total_relation_size('your_table_name'));

 

 

 

Replace 'your_table_name' with the actual name of the table you want to find the size of.

This query will return the size of the table in a human-readable format, such as "23 MB" or "1 GB". The pg_total_relation_size function returns the total size of the table including all indexes and associated objects, and pg_size_pretty formats the size in a readable format.

 

In Adobe Campaign JS  you can do

 

 

var res = sqlSelect("table,@size:number",
        "SELECT pg_size_pretty(pg_total_relation_size('nmsGroup'))")
logInfo(res.table.@size)

 

 

 

>> 04/06/2023 4:55:16 AM js 160 kB

 

 

Marcel Szimonisz

MarTech Consultant
for more tips visit my blog
https://www.martechnotes.com/

Avatar

Level 4

Hi Marcel,

 

The sqlSelect command in JS worked perfectly. Now, I can able to see the size of the table now.

Appreciating your Swift response.

 

Thanks,

Raviteja Gundu.