Unable to retrieve data with cluster_slow_query

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: cluster_slow_query查不出数据

| username: Miracle

To improve efficiency, please provide the following information for a clearer problem description to get a quicker resolution:
【TiDB Usage Environment】

【Overview】 Scenario + Problem Overview
Running select * from cluster_slow_query where time between '2022-09-20-09:30:00' and '2022-09-20-11:30:00'; does not return any data,
but running select count(*) from cluster_slow_query where time between '2022-09-20-09:30:00' and '2022-09-20-11:30:00'; returns data.

Am I doing something wrong?

【Phenomenon】 Business and Database Phenomenon

【TiDB Version】
V5.4.0

| username: db_user | Original post link

What account are you using, and does it have process permissions?

| username: wuxiangdong | Original post link

Is the time format incorrect?

| username: wuxiangdong | Original post link

The format ‘2022-09-20 11:30:00’

| username: Miracle | Original post link

I don’t think it has anything to do with the time format.

| username: Miracle | Original post link

Using the administrator account

| username: gary | Original post link

Can I view the added conditions?

| username: Miracle | Original post link

Isn’t time just a column condition? Adding the user condition doesn’t work either.
If you replace the asterisk with specific columns, it works, but if you replace it with all columns, it still doesn’t work.

| username: gary | Original post link

What I mean is to query like “select column_name”. In that case, your account might not have column permissions for some specific columns, right?

| username: Miracle | Original post link

However, when I execute select * from cluster_slow_query limit 1;, there are results. :sob:

| username: yilong | Original post link

Can the slow queries on the dashboard provide information?

| username: Kongdom | Original post link

I also feel it’s a permissions issue; a similar problem occurred before.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.