Labsco
MCP SERVER

Hologres

by aliyun

Run Hologres from the client and diagnose it too: SELECT, DML and DDL, estimated and actual execution plans, slow queries opened up by query_id, lock contention, warehouses resized and rebalanced, and a dropped table restored from the recycle bin.

Relational SQL DatabasesVerified
Summary
It carries the diagnosis tools, not only the query tools.

Most database servers stop at running SQL. This one continues into the part where a query is slow: slow queries ordered by duration out of hg_query_log, one of them opened by query_id with memory, CPU time and read/write statistics attached, the actual execution plan rather than the estimated one, lock contention showing who is blocking whom, and a cancel by PID when the right answer is to stop it outright. Administration goes further still, down to resizing a computing group and rebalancing its shards. Two things bound what you can actually use: several tools name a Hologres version floor in their own descriptions, and the warehouse and queue tools need superuser.

What it is

A Hologres server covering query execution, schema inspection, performance diagnosis and instance administration down to computing groups and query queues.

What you get
  • SQL split by kind: SELECT, a serverless SELECT for re-running a query that exceeded the memory limit, DML including dynamic-table refresh, and DDL
  • Schema reading: schemas, tables in a schema with their types, a table's DDL script, its properties (distribution key, clustering key, segment key, bitmap and dictionary columns, binlog settings), its Table Group and shard count, and its storage size split into data, index and metadata
  • Planning: the query plan, the actual execution plan with runtime statistics, and ANALYZE TABLE so the optimiser has current statistics to work from
  • Diagnosis: slow queries from hg_query_log ordered by duration, one query analysed by query_id for duration, memory, CPU time and read/write statistics, active queries and connections from pg_stat_activity, a query cancelled or terminated by PID, and lock contention showing blocking and waiting queries together
  • Dynamic tables listed with their status, freshness settings and last refresh, and their refresh history with duration, status and latency
  • Warehouses listed with CPU, memory, cluster count and status; the session switched to one; suspended, resumed, restarted, renamed or resized; scaling progress read; and shard rebalancing triggered
  • Query queues and their classifiers created, dropped, cleared and configured, listed alongside their concurrency limits, queue sizes and routing rules
  • Recovery and external data: the recycle bin listed and a dropped table restored, MaxCompute foreign tables created for query acceleration, external databases listed, and OSS files queried directly through EXTERNAL_FILES in CSV, Parquet or ORC
  • query_and_plotly_chart, returning both the result rows and a base64-encoded PNG of the chart
Requirements

A Hologres instance and a database user, supplied as HOLOGRES_HOST, HOLOGRES_PORT, HOLOGRES_USER, HOLOGRES_PASSWORD and HOLOGRES_DATABASE. Several tools state their own version floor — query queues, classifiers and external databases need Hologres V3.0 or later and query_hg_external_files needs V4.1 or later — and the warehouse and queue management tools need superuser privileges.

Setup effort

One command plus a key — pip install hologres-mcp-server, then supply credentials