Anonymous
Not applicable

@Someswara Durga Prasad Yaralgadda​ : I am giving you some ideas on how to think about this. Please test and implement what best suits you.

There are a few things you can do to optimize the performance of your notebooks:

  1. Consider using a higher performance cluster with more powerful worker nodes if your current cluster is struggling to keep up with your workloads.
  2. Optimize your queries to improve their performance. For example, you can try using more efficient SQL queries or optimizing your data pipeline to reduce the amount of data being processed.
  3. If you are experiencing slow query performance, consider using caching or optimizing your data storage to improve query speed.
  4. Avoid running unnecessary code in your notebooks. This can slow down the overall execution time and consume resources unnecessarily.

In regards to the specific issue you are facing, truncating a table can be a resource-intensive operation and may take longer to execute on larger tables. You may want to consider optimizing the table schema or partitioning your data to improve the performance of your queries. Additionally, you can try using the DROP TABLE statement instead of TRUNCATE TABLE, which can sometimes be faster.

Lastly, if your notebook is running 24/7, it may be a good idea to periodically restart the kernel to free up any resources that may have been consumed over time.