Why Looker filter field with suggestion run a query for each letter entered?

In Looker, when using a filter field with suggestions (e.g., company_name), placing the cursor in the box immediately triggers a database query to fetch distinct values. As I start typing a value, like "google", Looker continues to issue queries with incremental filters:

  • company LIKE '%g%'
  • company LIKE '%go%'
  • company LIKE '%goo%'
  • ...

These queries stack up in my database queue. Is this expected behavior? You can imagine the number of unnecessary queries being sent to the database, which becomes a significant burden, especially with larger tables. The queries remain active and are not canceled until the browser is closed.

If we cannot change this behavior, what is the best practice for using filter suggestions? It seems we should only enable suggestions (with database queries) if: (a) The database table is small, or (b) Suggestions are really crucial for user experience.

What are your thoughts on this?

 

 

0 1 136
1 REPLY 1
Top Labels in this Space