long_query_time

Overview

Log all queries that have taken more than long_query_time seconds to execute to the slow query log file. The argument will be treated as a decimal value with microsecond precision

USAGE

For details on how to use this system variable, see "Slow Query Logs".

DETAILS

SYNONYMS

SCHEMA

PARAMETERS

Command-line

--long_query_time=#

Configuration file

Supported

Dynamic

Yes

Scope

Global, Session

Data Type

DOUBLE

Minimum Value

0

Maximum Value

31536000

Product Default Value

10.000000

SKYSQL

Cloud

SkySQL Topology

ES Ver

Service Default

AWS

Multi-Node Analytics

10.6

10.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

Single Node Analytics

10.6

10.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

Replicated Transactions

10.4

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.5

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.6

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

Single Node Transactions

10.4

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.5

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.6

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

GCP

Multi-Node Analytics

10.6

10.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

Single Node Analytics

10.6

10.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

Replicated Transactions

10.4

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.5

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.6

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

Single Node Transactions

10.4

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.5

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

10.6

1.000000 (choices: 10ms, 20ms, 30ms, 40ms, 50ms, 60ms, 70ms, 80ms, 90ms, 100ms, 150ms, 200ms, 300ms, 500ms, 1s, 2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 15s, 20s, 30s, 1m, 2m, 3m, 5m, 10m, 15m)

Cloud

SkySQL Topology

ES Ver

Service Default

AWS

ColumnStore Data Warehouse

10.6

10.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

Enterprise Server With Replica(s)

10.4

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.5

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.6

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

Enterprise Server Single Node

10.4

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.5

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.6

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

GCP

ColumnStore Data Warehouse

10.6

10.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

Enterprise Server With Replica(s)

10.4

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.5

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.6

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

Enterprise Server Single Node

10.4

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.5

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

10.6

1.000000 (choices: 0.01, 0.1, 0.02, 0.2, 0.03, 0.3, 0.04, 0.05, 0.5, 0.06, 0.07, 0.08, 0.09, 0.15, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 15.0, 20.0, 30.0, 60.0, 120.0, 180.0, 300.0, 600.0, 900.0)

PRIVILEGES

EXAMPLES

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

10.6 Enterprise

  • Present starting in MariaDB Enterprise Server 10.6.4-1.

10.6 Community

  • Present starting in MariaDB Community Server 10.6.0.

10.5 Enterprise

  • Present starting in MariaDB Enterprise Server 10.5.3-1.

10.5 Community

  • Present starting in MariaDB Community Server 10.5.0.

10.4 Enterprise

  • Present starting in MariaDB Enterprise Server 10.4.6-1.

10.4 Community

  • Present starting in MariaDB Community Server 10.4.0.

10.3 Enterprise

  • Present starting in MariaDB Enterprise Server 10.3.16-1.

10.3 Community

  • Present starting in MariaDB Community Server 10.3.0.

10.2 Enterprise

  • Present starting in MariaDB Enterprise Server 10.2.25-1.

10.2 Community

  • Present starting in MariaDB Community Server 10.2.0.

Release Series

History

10.6 Enterprise

  • Present starting in MariaDB Enterprise Server 10.6.4-1.

10.5 Enterprise

  • Present starting in MariaDB Enterprise Server 10.5.3-1.

10.4 Enterprise

  • Present starting in MariaDB Enterprise Server 10.4.6-1.

EXTERNAL REFERENCES