cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to use vaccum analyze<table > and where it should be used for initial or delta load

Databricks_Work
New Contributor II
 
1 REPLY 1

Lakshay
Databricks Employee
Databricks Employee

Hi @Databricks_Work , Vacuum and Analzye are two separate commands that are used for optimizing the queries but they perform two different operations.

Vacuum is used to clear the stale data files in your delta table. Vacuum should be run after a optimize operation. We recommend to schedule a batch job to run optimize and vacuum. Generally, the preferred schedule is to run the job weekly but can be changed based on the use case.

Analyze command is used to collect stats on the delta table. This helps in query planning like choosing the type of operation. This command is usually run on adhoc basis but can also be put as part of the daily job run.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group