You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/mariadb/concepts-server-logs.md
+63-3Lines changed: 63 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: ajlam
5
5
ms.author: andrela
6
6
ms.service: mariadb
7
7
ms.topic: conceptual
8
-
ms.date: 12/17/2019
8
+
ms.date: 01/21/2020
9
9
---
10
10
# Slow query logs in Azure Database for MariaDB
11
11
In Azure Database for MariaDB, the slow query log is available to users. Access to the transaction log is not supported. The slow query log can be used to identify performance bottlenecks for troubleshooting.
@@ -37,6 +37,10 @@ Other parameters you can adjust include:
37
37
-**log_throttle_queries_not_using_indexes**: This parameter limits the number of non-index queries that can be written to the slow query log. This parameter takes effect when log_queries_not_using_indexes is set to ON.
38
38
-**log_output**: if "File", allows the slow query log to be written to both the local server storage and to Azure Monitor Diagnostic Logs. If "None", the slow query log will only be written to Azure Monitor Diagnostics Logs.
39
39
40
+
> [!IMPORTANT]
41
+
> If your tables are not indexed, setting the `log_queries_not_using_indexes` and `log_throttle_queries_not_using_indexes` parameters to ON may affect MariaDB performance since all queries running against these non-indexed tables will be written to the slow query log.<br><br>
42
+
> If you plan on logging slow queries for an extended period of time, it is recommended to set `log_output` to "None". If set to "File", these logs are written to the local server storage and can affect MariaDB performance.
43
+
40
44
See the MariaDB [slow query log documentation](https://mariadb.com/kb/en/library/slow-query-log-overview/) for full descriptions of the slow query log parameters.
41
45
42
46
## Diagnostic logs
@@ -75,5 +79,61 @@ The following table describes what's in each log. Depending on the output method
75
79
|`thread_id_s`| Thread ID |
76
80
|`\_ResourceId`| Resource URI |
77
81
78
-
## Next steps
79
-
-[How to configure and access server logs from the Azure portal](howto-configure-server-logs-portal.md).
82
+
## Analyze logs in Azure Monitor Logs
83
+
84
+
Once your slow query logs are piped to Azure Monitor Logs through Diagnostic Logs, you can perform further analysis of your slow queries. Below are some sample queries to help you get started. Make sure to update the below with your server name.
85
+
86
+
- Queries longer than 10 seconds on a particular server
87
+
88
+
```Kusto
89
+
AzureDiagnostics
90
+
| where LogicalServerName_s == '<your server name>'
Copy file name to clipboardExpand all lines: articles/mysql/concepts-server-logs.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: ajlam
5
5
ms.author: andrela
6
6
ms.service: mysql
7
7
ms.topic: conceptual
8
-
ms.date: 12/17/2019
8
+
ms.date: 01/21/2020
9
9
---
10
10
# Slow query logs in Azure Database for MySQL
11
11
In Azure Database for MySQL, the slow query log is available to users. Access to the transaction log is not supported. The slow query log can be used to identify performance bottlenecks for troubleshooting.
@@ -138,4 +138,5 @@ Once your slow query logs are piped to Azure Monitor Logs through Diagnostic Log
138
138
```
139
139
140
140
## Next Steps
141
-
- [How to configure and access server logs from the Azure CLI](howto-configure-server-logs-in-cli.md).
141
+
- [How to configure slow query logs from the Azure portal](howto-configure-server-logs-in-portal.md)
142
+
- [How to configure slow query logs from the Azure CLI](howto-configure-server-logs-in-cli.md).
0 commit comments