Support Questions
Find answers, ask questions, and share your expertise

Data analytics studio Postgres database is large due to query_detail table

Data analytics studio Postgres database is large due to query_detail table

New Contributor

Hello all,

    The postgres db for das is around 250 GB in which the table query_detail is alone 220 Gb filling up my disk space. How can I control this? Can I delete this table?

2 REPLIES 2

Re: Data analytics studio Postgres database is large due to query_detail table

Cloudera Employee

@JoSam 

Please refer below doc to clean old queries.
https://docs.cloudera.com/HDPDocuments/DAS/DAS-1.4.4/operations/content/das_postgres_db_cleanup.html

Can I delete this table?
select pg_size_pretty(pg_total_relation_size('query_details')); -- run this query to check the table size.

truncate table das.query_details CASCADE; -- run this command to truncate the table data.

Re: Data analytics studio Postgres database is large due to query_detail table

New Contributor

Thank you for your reply @balajip .

The output of the below query is 220GB.

Do I need to Truncate the table first before adding the new properties in Data Analytics Studio Event Processor config file template.

And how long will it take to Truncate this table.