diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2022-07-14 13:59:00 +0300 |
---|---|---|
committer | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2022-07-14 13:59:00 +0300 |
commit | 6bbdf00cfd1e13a5b69aba183ba3795d2185d2e8 (patch) | |
tree | 12b52bdca48c02227692534e365a9b7dcf75e2de | |
parent | 0917d3d85c670e2b915932c132a9731917fa8f48 (diff) |
Simplify ctx get chart list query
-rw-r--r-- | database/sqlite/sqlite_context.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/database/sqlite/sqlite_context.c b/database/sqlite/sqlite_context.c index c37612de03..4d557a34f2 100644 --- a/database/sqlite/sqlite_context.c +++ b/database/sqlite/sqlite_context.c @@ -120,9 +120,8 @@ void sql_close_context_database(void) // // Fetching data // -#define CTX_GET_CHART_LIST "SELECT c.chart_id, c.type||'.'||c.id, c.name, c.context, c.title, c.unit, c.priority, c.update_every, c.chart_type, c.family FROM meta.chart c " \ - "WHERE c.host_id IN (SELECT h.host_id FROM meta.host h " \ - "WHERE UNLIKELY((h.hops = 0 AND @host_id IS NULL)) OR LIKELY((h.host_id = @host_id)));" +#define CTX_GET_CHART_LIST "SELECT c.chart_id, c.type||'.'||c.id, c.name, c.context, c.title, c.unit, c.priority, " \ + "c.update_every, c.chart_type, c.family FROM meta.chart c WHERE c.host_id = @host_id; " void ctx_get_chart_list(uuid_t *host_uuid, void (*dict_cb)(SQL_CHART_DATA *, void *), void *data) { |