Ben Chuanlong Du's Blog

It is never too late to learn.

Volatile CTE and Subqueries in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. A volatile table persistents in the duration of the connection that creates it while a CTE is only accessible by the query following it. That is the scope of CTE is …

Hands on the Resource Module in Python

Tips and Traps

This module provides basic mechanisms for measuring and controlling system resources utilized by a process and its subprocesses. It cannot be used to check resource usage of other processes.

Check Resources Used by Processes Using Python

Use the tracemalloc Library

https://docs.python.org/3/library/tracemalloc.html#module-tracemalloc

The tracemalloc module is a debug tool to trace memory blocks allocated by Python. It provides the following information:

  • Traceback where an object was allocated
  • Statistics on allocated memory blocks per filename and per line number: total size, number and average size of allocated memory blocks