Article body
Full article
An operations dashboard takes 40 seconds to chart net order value by month and region. Between the click and the chart, requests may wait for a connection, join orders and refunds, scan partitions, transfer results and render the page. Importing frequently queried datasets that can be refreshed periodically into the HENGSHI SENSE acceleration engine moves some of that repeated work ahead of the request. Measure the baseline and candidate on the same workload to see how much time that saves. The 40-second wait and other figures here illustrate the investigation.
1. Find where the 40 seconds go
Take a real chart request and hold the user identity, filters, output row count and data version constant. Record time to first render, individual chart request time, execution time at the source and time spent queueing. Run both cold and warm trials. If the chart takes 40 seconds to appear and the database query takes two seconds, investigate chart count, serial and parallel requests, result size and rendering. If the database spends 35 seconds repeatedly joining orders and refunds, materializing the final intermediate result may make a substantial difference. For high-cardinality dimensions or charts that pull many detail rows, tune the filters and return size as well.
| Symptom | Evidence to find first | Possible adjustment |
|---|---|---|
| Cold queries are slow and repeated queries are fast | Chart result cache hits and whether the source gets the second request | Set cache policy to the freshness requirement and check cold queries separately |
| Every request scans a large table and repeats the same join | Source query plan, bytes scanned, join and aggregation times | Materialize the final dataset or build an analytical layer upstream |
| Individual charts are fast but opening the page at peak time is slow | Chart concurrency, connection queues, browser main thread and network | Limit charts on the first screen and returned rows, then assess concurrency and connection budgets |
| The source responds quickly but the dashboard is visibly stale | Business cutoff, engine import batch and cached-result age | Repair refresh or cache behavior and reconcile backfills and late data |
2. HENGSHI’s three-layer design

Figure 1. The three layers of HENGSHI BI acceleration, showing direct queries, the engine copy and the chart cache.
The source layer establishes the system of record and modeling boundaries
HENGSHI SENSE can create datasets from relational databases, analytical databases and big data platforms. Direct querying is a good starting point when the warehouse can reliably carry the analytical load. For transactional systems or expensive upstream queries, first define the fact grain, period, fields and refresh window. Order details, refund events and store master data change on different schedules. Decide which changes will trigger recomputation.
The engine layer reduces dataset computation at query time
HENGSHI’s performance documentation recommends enabling acceleration on final datasets that need it. Materialized joins or aggregations can serve subsequent queries. The v6.3 engine configuration guide lists PostgreSQL, GreenplumDB and Doris as packaged options, with GreenplumDB as the documented default. It also lists external engines such as Hologres and Redshift and other writable types recognized through JDBC, such as StarRocks. Verify that a database can be connected and that it can serve as an engine separately. The latter adds table creation, import, refresh and resource requirements that depend on the deployed release and configuration.
Distinguish direct queries, acceleration and chart cache hits
A direct-query dataset queries its source. A dataset imported and materialized successfully in the engine can query the engine-side result. An identical chart request may be served by the chart result cache. The HENGSHI guide explains that refreshing manually bypasses any chart result cache. The actual query still runs wherever the dataset configuration places it. During acceptance testing, trace the request from the chart to the query logs. Test engine disablement, a failed import and an interrupted connection in a test instance. Set a source capacity limit and follow the fallback behavior supported by the deployed release and implementation.
3. Compare architectures on the same workload
| Option | Where to test it first | Costs to account for |
|---|---|---|
| Direct queries to the existing warehouse | Mature partitioning and models with established concurrency controls | Queues and bills when interactive queries overlap with ETL |
| HENGSHI with a built-in engine | Little analytical capacity at the transactional source and hot data that can be synchronized periodically | Replica storage, import windows, failure recovery and capacity ownership |
| HENGSHI with an external acceleration engine | An analytical cluster and operations team the organization can allocate | Engine type, dialect, update approach and isolation between imports and queries |
| Upstream summary tables consumed by HENGSHI | Large joins or aggregations can run in advance and serve several tools | Drill-through, metric approval, historical recalculation and delivery time |
Run common aggregations, high-cardinality filters and concurrent detail queries with the same data for each candidate. Capture P50 and P95 latency, timeouts, scans and import load. Overlay a scheduled refresh on peak traffic and set concurrency limits using connection waits, engine CPU and I/O. Check the product guide for defaults for pool size, dataset import size and timeouts. Set production values from the load test.
4. Reconcile amounts and access before materializing
Mixed grains can make the wrong answer faster
A 100-yuan order line has two completed refunds of 10 and 20 yuan. Joining the line directly to refund events and then summing the order amount produces 200 yuan. To calculate operating net sales by the original order month, aggregate refunds at order-line grain before joining. The read-only query below uses cents and a refund cutoff so the source and candidate dataset can be reconciled. Use a separate event-based metric if finance books refunds in their completion month.
WITH refund_by_line AS (
SELECT order_line_id, SUM(amount_cent) AS refund_cent
FROM refund_events
WHERE status = 'completed'
AND completed_at < '2026-12-01 00:00:00'
GROUP BY order_line_id
)
SELECT o.region,
SUM(o.order_cent) AS gross_cent,
SUM(COALESCE(r.refund_cent, 0)) AS refund_cent,
SUM(o.order_cent - COALESCE(r.refund_cent, 0)) AS net_cent
FROM order_lines AS o
LEFT JOIN refund_by_line AS r
ON r.order_line_id = o.order_line_id
WHERE o.order_at >= '2026-10-01 00:00:00'
AND o.order_at < '2026-11-01 00:00:00'
GROUP BY o.region;
The expected gross, refund and net amounts for this sample are 10,000, 3,000 and 7,000 cents. Add a refund that completes in December, a line with no refund, stores across region boundaries and high-precision money fields. Check field names, numeric types, time zones and null mappings during import. Use the same cutoff in the production dashboard and reference query so any difference points to a data quality issue.
Check viewer access again after accelerating
The performance guide explains that accelerated datasets start from the dataset owner’s base privileges, on top of which subsequent permissions are configured. Test summaries, drill-down and exports as headquarters, region and store users in the pilot and verify the actual effect of row-level permissions. For direct-query datasets that use the current user’s source privileges, verify separately whether acceleration fits and what access model applies after import.
5. Plan for late data, corrections and interruptions
Engine-imported datasets can synchronize source changes with an immediate update or an update schedule. Full or incremental refresh is available for eligible datasets. Check the update guide for supported connections, creation methods and incremental strategies. If upstream jobs restate old orders, delete records or deliver late, test how historical data is corrected. Choose a key-based merge, a window refresh or a full rebuild as appropriate. Keep the last successful batch, maximum business timestamp, row count, monetary totals and refresh status as acceptance evidence.
A full re-import creates a new engine table with time information in its name. A copied dataset may reuse an engine table. HENGSHI periodically reclaims tables that no dataset references. When investigating storage or an import failure, review space use, import duration, failures, real references and any active imports. An old table name or a high table count is a reason to investigate. Reclaim storage through the platform mechanism and established operating procedure.
6. Identify what triggers precomputation
A ClickHouse incremental materialized view executes its query on newly inserted blocks from the source. With a JOIN, inserts into the left-hand source trigger it. Changes to the right-hand dimension do not recompute history, and updates and deletes at the source do not automatically flow to the target. This fits append-only facts where dimensions can use their at-insert values. If product classifications or prices need retrospective recalculation, use a refreshable materialized view, a scheduled recomputation or a backfill. Test what happens to yesterday’s results after changing only a dimension. HENGSHI can consume the resulting data through the relevant connection.
Pre-aggregation can limit a dashboard scan to day × region × category. Keep an order-detail dataset for drill-through. For ratios such as gross margin, store the numerator and denominator and recompute at the requested grain. For distinct visitor counts, check whether counts can be merged across dimensions and days. Document the error and applicability of approximate algorithms and compare sample results with an exact baseline.
7. Answer three questions before release
| Check | Repeatable test | What to measure |
|---|---|---|
| Is performance better? | Run the main dashboard over the same data and identity through direct, materialized and warm-cache paths | Query location, P95, source pressure, render time and timeouts |
| Do the numbers reconcile? | Add multiple refunds, month-end cutoffs, late data and nulls | Explain differences between the source and candidate and verify regional and detail access |
| Can operations handle a failure? | Simulate a failed refresh, engine unavailability and peak queues | Identify stale data and failed batches and keep source load under control during recovery |
Whether the 40-second query becomes usable depends on where time is saved, how well precomputation fits the workload and whether the savings justify maintaining a copy. Start with the most-used dataset whose figures are easiest to reconcile. Prove that it meets performance, accuracy and freshness requirements before deciding how widely to roll it out.
About HENGSHI Technology
Founded in 2016, HENGSHI Technology develops Agentic BI for the Data+AI era. Its enterprise analytics platform, HENGSHI SENSE, works with the HENGSHI Digital Employee, HENGSHI CLI execution engine and HENGSHI BOX for private deployment. Drawing on a decade of BI experience and the Powered by Hengshi ecosystem, HENGSHI helps software vendors and enterprise groups in manufacturing, finance, retail and government deploy trusted AI analytics in their own environments and use them for business decisions.