Skip to main content
Skip to main content

系统。字典

包含以下信息 外部字典.

列:

  • database (字符串) — Name of the database containing the dictionary created by DDL query. Empty string for other dictionaries.
  • name (字符串) — 字典名称.
  • status (枚举8) — Dictionary status. Possible values:
    • NOT_LOADED — Dictionary was not loaded because it was not used.
    • LOADED — Dictionary loaded successfully.
    • FAILED — Unable to load the dictionary as a result of an error.
    • LOADING — Dictionary is loading now.
    • LOADED_AND_RELOADING — Dictionary is loaded successfully, and is being reloaded right now (frequent reasons: SYSTEM RELOAD DICTIONARY 查询,超时,字典配置已更改)。
    • FAILED_AND_RELOADING — Could not load the dictionary as a result of an error and is loading now.
  • origin (字符串) — Path to the configuration file that describes the dictionary.
  • type (字符串) — Type of dictionary allocation. 在内存中存储字典.
  • key密钥类型:数字键 (UInt64) or Сomposite key (字符串) — form “(type 1, type 2, ..., type n)”.
  • attribute.names (阵列(字符串)) — Array of 属性名称 由字典提供。
  • attribute.types (阵列(字符串)) — Corresponding array of 属性类型 这是由字典提供。
  • bytes_allocated (UInt64) — Amount of RAM allocated for the dictionary.
  • query_count (UInt64) — Number of queries since the dictionary was loaded or since the last successful reboot.
  • hit_rate (Float64) — For cache dictionaries, the percentage of uses for which the value was in the cache.
  • element_count (UInt64) — Number of items stored in the dictionary.
  • load_factor (Float64) — Percentage filled in the dictionary (for a hashed dictionary, the percentage filled in the hash table).
  • source (字符串) — Text describing the 数据源 为了字典
  • lifetime_min (UInt64) — Minimum 使用寿命 在内存中的字典,之后ClickHouse尝试重新加载字典(如果 invalidate_query 被设置,那么只有当它已经改变)。 在几秒钟内设置。
  • lifetime_max (UInt64) — Maximum 使用寿命 在内存中的字典,之后ClickHouse尝试重新加载字典(如果 invalidate_query 被设置,那么只有当它已经改变)。 在几秒钟内设置。
  • loading_start_time (日期时间) — Start time for loading the dictionary.
  • last_successful_update_time (日期时间) — End time for loading or updating the dictionary. Helps to monitor some troubles with external sources and investigate causes.
  • loading_duration (Float32) — Duration of a dictionary loading.
  • last_exception (字符串) — Text of the error that occurs when creating or reloading the dictionary if the dictionary couldn't be created.

示例

配置字典。

确保字典已加载。