# 6.7.43 SHOW THREAD

Part of: [6 Language](6-language.md) › [6.7 Data Introspection Language (DIL)](6-7-data-introspection-language-dil.md)

### Syntax

**SHOW** [**MAX**] **THREAD**\
[_post_processing_option_]\
[_output_redirecting_option_]

### Description

Show (i.e. get) the number of (CPU) threads to use when executing operations that support parallelism. If the keyword MAX is not specified, the number of (CPU) threads returned refers to the number that may have been set through the [SET THREAD](6-8-17-set-thread.md) operation. Otherwise, if the keyword MAX is specified, the maximum number of (CPU) cores available on the machine is returned.

### Parameter(s)

_post_processing_option_ – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section [PROCESSING](6-2-processing.md) for additional information).

_output_redirecting_option_ – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection [INTO](6-3-2-into.md) for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter [CURSOR](4-cursor.md) for additional information).

### Return

The number of (CPU) threads to use when executing operations that support parallelism as an [HDFQL_INT](5-1-constants.md#hdfql_int).

### Example(s)

```hdfql
# set number of (CPU) threads (to use when executing operations that support parallelism) to 2
SET THREAD 2

# show (i.e. get) number of (CPU) threads (to use when executing operations that support parallelism) (should return 2)
SHOW THREAD

# set number of (CPU) threads (to use when executing operations that support parallelism) to 8
SET THREAD 8

# show (i.e. get) number of (CPU) threads (to use when executing operations that support parallelism) (should return 8)
SHOW THREAD

# set number of (CPU) threads (to use when executing operations that support parallelism) to the maximum number of (CPU) cores available on the machine
SET THREAD MAX

# show (i.e. get) number of (CPU) threads (to use when executing operations that support parallelism) (should return the maximum number of (CPU) cores available on the machine)
SHOW THREAD
```
