This topic describes how to configure a table to display query results. It also includes some examples.
Tables are the most common method to sort and display data for quick reference and analysis. All search and analytics results in Log Service can be rendered by using visualized charts. The query results are displayed in a table by default.
- Table header
- You can use a
SELECTstatement to specify the number of columns.
- The number of rows is computed based on the number of log entries in the specified
time range. The default clause is
- On the Search & Analysis page of a Logstore, enter a search and analytics statement
in the search box, specify the time range, and then click Search & Analyze.
The Chart tab is automatically displayed when a query is completed.
- Click to display the query results in a table.
- On the Properties tab on the right, configure the properties of the table.
Configuration item Description Items per Page The number of entries to return on each page. Zebra Striping Specifies whether to display the query results in a zebra-striped table. Transpose Rows and Columns Specifies whether to transpose rows and columns. Hide Reserved Fields Specifies whether to hide reserved fields. Disable Sorting Specifies whether to disable the sorting feature. Disable Search Specifies whether to disable the search feature. Highlight Settings The rules for highlighting rows or columns that conform to rules. Sparkline The Sparkline feature that you can use to add an area chart, line chart or column chart for columns in the table.
- To filter the
request_timefields in the latest 10 log entries, run the following statement:
* | SELECT request_method, request_uri, request_timetus GROUP BY request_method, request_uri, request_time LIMIT 10
- To query the average of the
request_time(the average request time) field values in the specified time range and round the average to three decimal places, run the following statement:
* | SELECT round(avg(request_time), 3) as average_request
- To group the values of the
remote_addrfield in the specified time range and sort the values in the descending order, run the following statement:
* | SELECT remote_addr, count(*) as count GROUP BY remote_addr ORDER BY count DESC