Performance¶
Make processes cheaper and faster, and measure what the framework and a dataset cost to serve.
| Where | Build |
| Who sees it | Data scientist, Data engineer and Admin. Query optimization and Server-side batches: Data engineer and Admin only. |
| Writes to the store | Only Apply the optimized SQL to the view in Query optimization. The other tabs read only. |
| Valid-time banner | Not followed: the page shows the current state, and the banner says so. |
The page has four tabs.
Query optimization¶
Score the EXPLAIN plan of a registered process view and propose rewrites, checked for compilation and for lost logic. The optimizer works on the body of the view: a body that does not compile stops the run with the database message, and the original SQL is never rewritten. The clean-ups repair model candidates only and are kept only when a candidate still compiles with them. The report shows the current and optimized SQL side by side, the clean-ups dropped and the reason of each rejected candidate. Its HTML or Markdown report can be downloaded. Compare the results (computes both) runs the measured comparison: both SELECTs are computed in full on volatile tables, compared, and dropped; the gate of the impact study applies, and Also measure CPU, I/O, spool and skew waits for DBQL. Writes: Apply the optimized SQL to the view replaces the view (header and LOCKING kept, a confirmation names the measured comparison) and records the new SQL version. Banner: current state. See Query optimizer.
Benchmark¶
Measures the serving latency and throughput of a dataset view (single key warm and cold, batches, concurrency, time travel, DBQL server time). Progress streams per phase and the result is one HTML report. It reads only. Banner: current state.
- Choose a dataset (the entity columns are read from the dataset catalog), then tick the tests to skip: parse-time check, large batch, batch strategies (
in_listagainst volatile join), concurrency sweep, time travel and server-side DBQL. - Max in_list batch keys caps the predicate size (blank means automatic). Stop if parse time exceeds (ms) stops the run after the first phase when the view takes too long to parse.
- Two progress bars show the phase count and the current phase. The report is shown inline and can be downloaded.
Framework cost¶
What tdfs4ds itself spends per call: statements and database time by phase (work, safety checks, the rest of the framework), fixed against variable cost per process with its break-even, latency against work with a round-trip what-if, volume classes, call kinds, the trend by package version, the heaviest framework phases with what cuts each, and anomalous steps. It reads the history FS_CALL_PHASES, which the harvest of run() fills from DBQL; the round trip is measured on demand on a connection of the app's own. Exports HTML and CSV. See Measure what the framework costs. Writes: nothing. Banner: current state.
Server-side batches¶
The opt-in way to send the MERGEs of a batch in one CALL of a generic stored procedure (tdfs4ds.SERVER_SIDE_BATCH). The tab shows what is installed, its text, whether it matches this version, the rights and the client SQL it replaces. Nothing is installed from this page.
- Refresh reads the database again.
- Install script (dry run), Install script (--apply) and Drop script (dry run) download a Python script. The dry run prints the statements;
--applyruns them. You run the script yourself.
Writes: nothing. Banner: current state.
Do the same in Python¶
The (?) button in the top bar opens a standalone script for this page. It asks for the password with getpass, never writes to the store, and can be copied or downloaded.
Query optimization: tdfs4ds.skill_optimize_query analyses the first process and writes the report (it calls the instruct model and does not change the view). Benchmark: tdfs4ds.run_benchmark on a small sample, then tdfs4ds.build_benchmark_html. Framework cost: tdfs4ds.framework_cost, tdfs4ds.write_framework_cost_report. Server-side batches: tdfs4ds.install_server_side_batch as a dry run and tdfs4ds.check_configuration(only=['server_side_batch']).