> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# default_* session settings

> ClickHouse session settings in the default_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

These settings are available in [system.settings](/docs/reference/system-tables/settings) and are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<h2 id="default_materialized_view_sql_security">
  default\_materialized\_view\_sql\_security
</h2>

<SettingsInfoBlock type="SQLSecurityType" default_value="DEFINER" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "DEFINER"},{"label": "Allows to set a default value for SQL SECURITY option when creating a materialized view"}]}]} />

Allows to set a default value for SQL SECURITY option when creating a materialized view. [More about SQL security](/docs/reference/statements/create/view#sql_security).

The default value is `DEFINER`.

<h2 id="default_max_bytes_in_join">
  default\_max\_bytes\_in\_join
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000000000" />

Maximum size of right-side table if limit is required but `max_bytes_in_join` is not set.

<h2 id="default_normal_view_sql_security">
  default\_normal\_view\_sql\_security
</h2>

<SettingsInfoBlock type="SQLSecurityType" default_value="INVOKER" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "INVOKER"},{"label": "Allows to set default `SQL SECURITY` option while creating a normal view"}]}]} />

Allows to set default `SQL SECURITY` option while creating a normal view. [More about SQL security](/docs/reference/statements/create/view#sql_security).

The default value is `INVOKER`.

<h2 id="default_table_engine">
  default\_table\_engine
</h2>

<SettingsInfoBlock type="DefaultTableEngine" default_value="MergeTree" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "MergeTree"},{"label": "Set default table engine to MergeTree for better usability"}]}]} />

Default table engine to use when `ENGINE` is not set in a `CREATE` statement.

Possible values:

* a string representing any valid table engine name

Cloud default value: `SharedMergeTree`.

**Example**

Query:

```sql theme={null}
SET default_table_engine = 'Log';

SELECT name, value, changed FROM system.settings WHERE name = 'default_table_engine';
```

Result:

```response theme={null}
┌─name─────────────────┬─value─┬─changed─┐
│ default_table_engine │ Log   │       1 │
└──────────────────────┴───────┴─────────┘
```

In this example, any new table that does not specify an `Engine` will use the `Log` table engine:

Query:

```sql theme={null}
CREATE TABLE my_table (
    x UInt32,
    y UInt32
);

SHOW CREATE TABLE my_table;
```

Result:

```response theme={null}
┌─statement────────────────────────────────────────────────────────────────┐
│ CREATE TABLE default.my_table
(
    `x` UInt32,
    `y` UInt32
)
ENGINE = Log
└──────────────────────────────────────────────────────────────────────────┘
```

<h2 id="default_temporary_table_engine">
  default\_temporary\_table\_engine
</h2>

<SettingsInfoBlock type="DefaultTableEngine" default_value="Memory" />

Same as [default\_table\_engine](/docs/reference/settings/session-settings/default#default_table_engine) but for temporary tables.

In this example, any new temporary table that does not specify an `Engine` will use the `Log` table engine:

Query:

```sql theme={null}
SET default_temporary_table_engine = 'Log';

CREATE TEMPORARY TABLE my_table (
    x UInt32,
    y UInt32
);

SHOW CREATE TEMPORARY TABLE my_table;
```

Result:

```response theme={null}
┌─statement────────────────────────────────────────────────────────────────┐
│ CREATE TEMPORARY TABLE default.my_table
(
    `x` UInt32,
    `y` UInt32
)
ENGINE = Log
└──────────────────────────────────────────────────────────────────────────┘
```

<h2 id="default_view_definer">
  default\_view\_definer
</h2>

<SettingsInfoBlock type="String" default_value="CURRENT_USER" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "CURRENT_USER"},{"label": "Allows to set default `DEFINER` option while creating a view"}]}]} />

Allows to set default `DEFINER` option while creating a view. [More about SQL security](/docs/reference/statements/create/view#sql_security).

The default value is `CURRENT_USER`.
