Common errors returned in log query and analysis are as follows:

1. line 1:44: Column 'my_key_field' cannot be resolved;please add the column in the index attribute

Cause: The my_key_field key cannot be referenced in query because it does not exist.

Solution: In the upper-right corner of the log query and analysis page, click Index Attributes to create an index on this field and enable the statistics feature for this field.

2. Column 'xxxxline' not in GROUP BY clause;please add the column in the index attribute

Cause: You use the GROUP BY clause and reference a non-aggregate field in a SELECT statement. This field, however, is not specified in the GROUP BY clause. For example, you use select key1, avg(latency) group by key2 in which key1 is not specified in the GROUP BY clause.

Solution: The correct syntax is select key1,avg(latency) group by key1,key2.

3. sql query must follow search query,please read syntex doc

Cause: No filter conditions are specified in a statement, for example, select ip,count(*) group by ip.

Solution: The correct syntax is *|select ip,count(*) group by ip.

4. please read syntex document,and make sure all related fields are indexed. error after select .error detail:line 1:10: identifiers must not start with a digit; surround the identifier with double quotes

Cause: The column name or variable name referenced in an SQL statement starts with a number and does not comply with the rules.

Solution: We recommend that you change the name to make it start with a letter.

5. please read syntex document,and make sure all related fields are indexed. error after select .error detail:line 1:9: extraneous input " expecting

Cause: A word is misspelled.

Solution: Correct the misspelled word.

6. key (category) is not config as key value config,if symbol : is in your log,please wrap : with quotation mark "

Cause: No index is created on the category field. As a result, it cannot be used in query and analysis statements.

Solution: Create an index on this field in the index attributes. For more information, see Enable and configure the index of a Logstore.

7. Query exceeded max memory size of 3GB

Cause: The size of the memory used by the current query exceeds 3 GB on the server. The common cause is that a large number of values are still returned in the query result after you use the GROUP BY clause to remove duplicates.

Solution: Reduce the number of keys specified in the GROUP BY clause.