#include #include #include #include #include #include namespace DB { BlockIO InterpreterShowProcesslistQuery::execute() { return executeQuery("SELECT * FROM system.processes ORDER BY elapsed DESC", getContext(), QueryFlags{ .internal = true }).second; } void registerInterpreterShowProcesslistQuery(InterpreterFactory & factory) { auto create_fn = [] (const InterpreterFactory::Arguments & args) { return std::make_unique(args.query, args.context); }; factory.registerInterpreter("InterpreterShowProcesslistQuery", create_fn); } }