Hi JenP ,
Welcome to Microsoft Q&A platform and thanks for posting your question here.
As per my understanding, you are investigating about how tempDB works in synapse SQL DW and how it fits into the architecture of synapse.
In Synapse SQL DW, there is a distributed architecture that supports MPP (Massively Parallel Processing) which uses distributed TempDB. In SQL DW, each compute node has its own local storage, including a local version of tempDB. These local tempDBs are not shared across nodes. Each node uses its local tempDB for temporary storage during query execution.
When a query is executed in a SQL pool, the compute nodes work together to process the query. Each compute node has its own local storage, but tempDB is a shared resource that is used by all compute nodes. This means that any operation that requires tempDB will write to the same tempDB, regardless of which compute node is executing the operation.
The Distributed Management Service (DMS) is responsible for coordinating the activities of the compute nodes in a SQL pool. The DMS manages the distribution of data across the compute nodes and ensures that each node has access to the data it needs to execute queries. However, the DMS does not manage tempDB directly. Instead, tempDB is managed by the SQL Server engine running on each compute node.
In summary, tempDB is a shared resource that is used by all compute nodes in a SQL pool. Each compute node has its own local storage, but tempDB is a shared resource that is used by all nodes. The DMS is responsible for coordinating the activities of the compute nodes, but does not manage tempDB directly.
The scope of tempory tables is within the session. When a new session is created, no temporary tables would be automatically deleted. So, the space would be freed up in every new session .
If you are using dedicated sql pool, max size for tempdb is 399 GB per DW100c.
In case of serverless sql pool, The number of temporary tables is limited to 100, and their total size is limited to 100 MB.
Hope it helps. Thankyou