A string specifying the length of time in seconds, minutes, or hours as follows: "N (seconds | minutes | hours)"
Definition
When Looker determines the values that it will suggest to users when they filter on a dimension or filter field, it runs a query to find the unique values of that field. By default this list of suggestions is cached for 6 hours. However, you can change the amount of time that suggestions are cached using suggest_persist_for.
Looker typically generates suggestions for a dimension by executing a SELECT DISTINCT query on that dimension. For some large tables this query can be too slow, or create too large of a database load. Caching suggestion values for a longer period reduces the number of SELECT DISTINCT queries. Alternatively, if your database is updated frequently, a shorter cache time results in fresher suggestion lists.
Examples
Set the suggestion cache for the name dimension to 30 minutes:
dimension: name {
sql: ${TABLE}.name ;;
suggest_persist_for: "30 minutes"
}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[],null,["# suggest_persist_for\n\n\u003cbr /\u003e\n\nUsage\n-----\n\n```\nview: view_name {\n dimension: field_name {\n suggest_persist_for: \"5 hours\"\n }\n}\n```\n\nDefinition\n----------\n\nWhen Looker determines the values that it will suggest to users when they filter on a [`dimension`](/looker/docs/2512/reference/param-field-dimension) or [`filter`](/looker/docs/2512/reference/param-field-filter) field, it runs a query to find the unique values of that field. By default this list of suggestions is cached for 6 hours. However, you can change the amount of time that suggestions are cached using `suggest_persist_for`.\n\nLooker typically generates suggestions for a dimension by executing a `SELECT DISTINCT` query on that dimension. For some large tables this query can be too slow, or create too large of a database load. Caching suggestion values for a longer period reduces the number of `SELECT DISTINCT` queries. Alternatively, if your database is updated frequently, a shorter cache time results in fresher suggestion lists.\n\nExamples\n--------\n\nSet the suggestion cache for the `name` dimension to 30 minutes: \n\n dimension: name {\n sql: ${TABLE}.name ;;\n suggest_persist_for: \"30 minutes\"\n }"]]