Skip to content

Adhoc long query when selecting a value #1490

@Smelentyev

Description

@Smelentyev

What happened:
If a table has many rows, adding an adhoc query will execute the query
Select DISTINCT column FROM TABLE LIMIT 1000
This query can scan the entire table if there are fewer than 1000 values.
This issue has already been discussed in
#120
and even added the __adhocColumns macro
but it was later removed.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

  1. add adhoc filter by big table for column.

Screenshots

Image

Anything else we need to know?:

Environment:

  • Grafana version: 12.3.1
  • Plugin version: 4.11.3
  • OS Grafana is installed on: Ubuntu
  • User OS & Browser: Chrome
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Incoming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions