- Microsoft Operations Management Suite Cookbook
- Chiyo Odika
- 346字
- 2021-08-27 20:22:12
There's more...
As mentioned earlier, Log Analytics queries can start with either a table name or a search command. We looked at table-based queries at length in the previous section, and will now look at search-based queries.
When dealing with large data sets, search-based queries will have a higher query performance cost, and could take longer to complete than a table-based query. The performance and processing time could be even longer if the search queries are not scoped.
Because search queries are less structured than table-based queries, they are actually preferable, and are better employed when searching for specific values across columns or tables. For instance, given tables named SecurityEvent and WireData, you can easily search for a specific value by scoping the tables. Consider the following query that makes no use of table scoping:
Search "Failed"
The preceding query searches all columns in all tables in a workspace for the term "Failed". This query will not execute as efficiently as a query that makes use of a table scope:
Search in (SecurityEvent, WireData) "Failed"
The preceding query results in a more efficient query operation because the search is scoped to specific tables.
In addition to table scoping, search-based queries support the use of boolean operators (AND, OR), and operations such as filtering, sorting, and aggregation. For instance, you can use a table scope to define and shape the initial result set and perform further operations on the data:
search in (WireData) "*Russia*"
| distinct Computer, ApplicationProtocol
In the preceding search-based query, the query scopes the initial result set to records in the WireData table columns that contain "*Russia*". It then passes the returned result set on for further processing using the distinct tabular operator, which produces a table with the distinct combination of the Computer and ApplicationProtocol columns of the WireData table:

- Windows Server 2019 Cookbook
- Linux運維實戰:CentOS7.6操作系統從入門到精通
- 嵌入式Linux系統開發:基于Yocto Project
- Windows Vista融會貫通
- 計算機系統開發與優化實戰
- Python基礎教程(第3版)
- 深入理解eBPF與可觀測性
- VMware NSX Cookbook
- Kali Linux 2018:Windows Penetration Testing
- Linux服務器配置與管理
- Django Project Blueprints
- 計算機應用基礎(Windows 7+Office 2016)
- Kali Linux高級滲透測試(原書第3版)
- 電腦辦公(Windows 10 + Office 2016)入門與提高(超值版)
- 應急指揮信息系統設計