What gets built, in what order, under which acceptance criteria — and how far it has got. Phase 0 is closed and measured; the full evidence lives in the Phase 0 report, one click away.
The whole lab exists to answer one question, and the plan is judged on whether it answers that question with measured evidence.
Losses are part of the expected result (native text search and point lookup). If measurement does not produce them, the report must state that the hypothesis was refuted and show the number — not quietly drop the query.
Three verdicts only. Defined before measuring, so the bar cannot move after the numbers arrive.
| Win | StarRocks median ≥ 3× faster and p95 keeps ≥ 2×. |
| Tie | Ratio between 1.2× and 3× either way, or good median with overlapping p95. |
| Loss | MySQL ≥ 1.2× faster in median, reproducibly across 5 runs. |
Every winning row must name a mechanism (columnar scan, vectorised aggregation, no per-row lookups); every losing row must name the structural cost that causes it. A report that lists winners and stops is not an answer to the question.
Everything below was checked on this machine before the plan was written. None of it is assumed.
| Item | Measured value | Implication for the lab |
|---|---|---|
| Docker | 29.9.3 (build 5457199) | OK Docker Desktop is running; nothing to install. |
| Backend / kernel | WSL2 · 6.6.87.2-microsoft-standard · overlayfs | Runs linux/amd64 images natively on x86_64, no qemu emulation. |
| CPU assigned to daemon | 8 vCPU | Enough: the PoC compares engines, not scaling. CPU count will be pinned in compose so both engines see the same. |
| RAM available to daemon | 24.89 GB (24,891,322,368 B) | Headroom Allows a hard 4 GB cap on StarRocks with room to spare, so the PoC stays reproducible on an 8 GB machine. |
| Free disk (E:, workspace) | 168.6 GB | Plenty for CSV, volumes and dumps. The subset is sized by memory, never by disk. |
| Free disk (C:) | 116.5 GB | Docker volumes live on the daemon disk (WSL2, typically C:). Watch it as the image grows. |
| MySQL client on lab host | not installed · no pymysql | Extraction will run through the mysql client container, so nothing is installed on the host. |
Reachability 129.80.141.192:3306 | TCP closed (timeout) | Resolved Not needed: the source is queried over SSH + local socket, so MySQL stays bound to loopback. |
Reachability 129.80.141.192:22 | TCP open | In use SSH key auth as ubuntu, read-only session. |
StarRocks documentation asks for 4 GB RAM and 10 GB disk for Docker, x86 with AVX2 recommended, Ubuntu 22.04 supported. This host clears the minimums comfortably; the 4 GB cap is kept for reproducibility, not because it is needed here. AVX2 must be confirmed inside the container at first boot, since it affects vectorised execution and therefore the validity of every timing.
Three items gated the start. Two are closed as of 2026-11-25; one remains, and it only blocks the container build.
Resolved with the OCI SSH key: ubuntu@pidecerca-prod, MySQL over the local socket as root@localhost. Port 3306 stays bound to 127.0.0.1; nothing new is exposed to the internet.
Read-only guarantees held: no DDL, no writes, no ANALYZE, nothing installed. Full scans run sequentially, each timed. Key handled through a temp copy with a restricted ACL; the original was never modified.
Compose must carry an immutable tag, never :latest. Proposal: the 3.5.x line with the exact tag and digest recorded in the compose file, consistent with the JDK 17+ requirement for 3.5 and above.
Associated risk: whether date_trunc('year', …) expression partitioning exists on the pinned build. Not assumed — tested in Phase 3 on a one-row table, with a literal-year RANGE fallback.
The value is numeric, not text: Cuantia_Contrato and valor_contrato are double. No thousands separators, no derived column, no cleaning function.
Measured caveats: 10.9 % of SECOP I rows carry 0, and one row holds an absurd maximum of 3.64e14 that can dominate a SUM. Both facts go in the report; neither changes the comparison, since both engines read the same rows.
Column inventory, index map, reference counts, year distribution and value-quality checks: Phase 0 report. The short version: docs/schema-notes.md.
Eleven phases, each with a gate: no phase starts until the previous acceptance criterion is met and recorded. Phase 1 provisions Docker and pins the images. Current state: F0 to F6 complete (100 % each) — Phase 0 results are published — both engines hold the same 1,309,594 rows, zero filtered, the three reference counts inside ±1 % and partition pruning demonstrated at partitions=1/25. F5 complete: StarRocks wins three of four queries — 130× on aggregation, 58× on the join, 22.6× on substring — and loses the point lookup 18.6× once client overhead is removed. F6 complete: INFORME.md states the subset size on page one, publishes both ratios (130× and 86×) and gives the plan behind every win and the loss.
| Phase | Progress | Status | Gate / blocking item |
|---|---|---|---|
| F0 · Schema discovery | Complete | Gate met · Phase 0 report → | |
| F1 · Docker provisioning & image pull | Complete | Pinned: StarRocks 3.5.21 · MySQL 8.0.46 · report | |
| F2 · Subset design & verification | Approved | k = 13 signed off · spec frozen · report | |
| F3 · Compose & DDL | Complete | Both engines up · 25 partitions · DDL clean · report | |
| F4 · Export & load | Complete | 1,309,594 rows both engines · 0 filtered · partitions=1/25 · report | |
| F5 · Benchmark & query profiles | Complete | 3 of 4 queries won · Q3 lost 18.6× · report | |
| F6 · Technical report | Complete | 12 blocks · 10 charts · report · .md | |
| F7 · Six-minute video | Next | Unblocked · video.md | |
| F8 · Dashboard API · Spring Boot | Complete | 11 endpoints · read-only user · 8 tests · report | |
| F9 · Dashboard · React + Vite | Complete | 6 KPIs · 10 charts · explainer · report | |
| F10 · Packaging and close | Next | Unblocked · API and bundle already run by hand | |
| F11 · Dashboard v2 | Complete | 22 charts · 5 tables · report |
Percentages are effort-weighted against 9.05 working days: the original 5.8, plus 1.75 for the three dashboard phases and another 1.5 for the v2 rebuild. That is why the ring reads 70 % with the same seven phases closed — the plan grew, not the work undone. Closing a 0.5-day phase still moves the needle by 6.6 points, not 12.5.
| Real columns | information_schema.COLUMNS: 85 columns on secop_i_records, 96 on secop_ii_registros. The seven named in the brief all exist; they are a subset. |
| Indexes | 4 FULLTEXT on SECOP I and 7 on SECOP II, confirmed by name and column, plus PRIMARY (UID) and PRIMARY (id_contrato). |
| Physical structure | No partitioning on either table (PARTITION_COUNT = 1). Statistics are stale after today's rebuild — TABLE_ROWS reports 411 k rows against 17 M real ones, so every count uses COUNT(*). |
| Value column | Numeric (double). Zeros: 1,216,698 (10.9 %). Maximum: 3.64e14, an outlier. No NULLs. |
| Time column | SECOP II has fecha_firma DATE. SECOP I has only a text date and a varchar year, so its year must be derived to an integer. |
| Validation | 667,388 · 70,941 · 23,372 reproduced. The third one required discovering that the brief's figure came from FULLTEXT, not LIKE. |
schema-notes.md exists with types, indexes, value/date decisions and the three reference counts confirmed. Read the full Phase 0 report →| Engine check | docker --version, docker compose version (v2 plugin required), docker info: backend, storage driver, vCPU and RAM. Today that reads 29.9.3, WSL2, overlayfs, 8 vCPU, 24.89 GB. On this host Docker is already installed, so this phase is verification plus hardening; on a fresh machine it also covers installing Docker Desktop or Engine and enabling the WSL2 backend. |
| Resource allocation | Set an explicit cap in .wslconfig (memory, processors, swap) so the 4 GB container never competes with the host, then restart and confirm the cap through docker info. A container limit without a daemon-level cap is only half a limit. |
| Port availability | Confirm 9030, 8030, 8040 and 3306 are free on the host before writing compose. A port already bound produces the classic "container is up, connection refused" failure that costs an hour later. |
| Image pull | docker pull starrocks/allin1-ubuntu:<pinned-tag> and docker pull mysql:8.0.46. Read RepoDigests from docker image inspect and paste the digest into compose. Pulling happens early because it is the slowest, most network-dependent step. |
| Runtime inside the image | One throwaway container: confirm AVX2 in /proc/cpuinfo, java -version at 17 or above, and that the entrypoint starts. Then remove it. This is where the official requirements become measured facts. |
| Offline fallback | If the registry throttles or the network blocks: authenticated pull, a mirror, or docker save / docker load from another machine. A saved tar with a recorded digest is the reproducible escape hatch. |
| Disk headroom | docker system df: the WSL2 virtual disk must hold both images plus volumes. The size is read from that command, never estimated, and recorded next to the digests. |
allin1-ubuntu:3.5.21 @ sha256:faf5f6b1…8b2a (5.18 GB) · mysql:8.0.46 @ sha256:7dcddc01…ae2b (1.1 GB). Pinning them in the compose file happens in Phase 3. Report →| Budget | Container memory cap: 4 GB. From that: raw CSV ≤ 3 GB and compressed footprint in StarRocks ≤ 1.5 GB. The subset is sized by memory, never by disk. |
| Strategy A | Year slicing. Rejected on measurement: a single recent SECOP II year is 935 k–1.04 M rows (≈2.2–2.5 GB of CSV), and 2023 alone is 841 k (≈2.0 GB). One year plus any SECOP I slice breaks the 3 GB ceiling. |
| Strategy B | Deterministic modulo sampling on the identifier (CRC32(pk) % k = 0). Reproducible, parallelisable, no ORDER BY, preserves the mix of entities and years. Selected with k = 13. |
| Export spec | Frozen in sql/03_export_spec.sql: the two canonical SELECTs, the year derivation (declared year → parsed date → 0), the column mapping to the unified table, and the four checks that must run with the export. Hash uniformity verified: 7.72 % on a 200 k-row sample against 7.69 % expected. |
| Size result | 855,452 + 452,877 = 1,308,329 rows, ≈2.7 GB CSV. Expected matches: 51,338 / 5,457 / 1,837 against thresholds of 50,000 / 5,000 / 1,500. |
| Verification | Recompute the three counts on the exported subset; compare against the expected fraction (±1 %); record total rows, byte size and null counts on key columns. Subset figures go on page one of the report. |
| Integrity | Export from a consistent snapshot (single read transaction) so rows cannot shift mid-export; checksum or block hash to compare export against load. |
| docker-compose.yml | starrocks/allin1-ubuntu pinned by tag and the digest captured in Phase 1; explicit mem_limit/deploy.resources (4 GB), capped cpus, ports 9030/8030/8040 bound to loopback, named volume, FE healthcheck. MySQL 8.0.46 as a second service under the same memory cap. |
| ddl.sql | DUPLICATE KEY justified (append-only fact table, no write-time dedup); year partitioning; buckets sized per partition volume; replication_num = 1 because there is a single BE; an explicit unknown-year partition, because 1.58 M source rows have no date. |
| Partition test | Measured on 3.5.21: expression partitioning works — PARTITION BY date_trunc('year', ts) created p2023 and p2024 on demand. It was still rejected: 1.58 M source rows have no date, and a date expression would have to invent one. The DDL uses RANGE(anio) with an explicit p_unknown. Second finding: RANGE bounds must be quoted (LESS THAN ("2004")) even for an INT column. |
| Boot verification | Both services healthy, SELECT 1 on 9030, MySQL up, and the FE/BE versions recorded from the running containers — not from the tag name. |
docker compose up -d left both engines healthy in 40 s; SELECT 1 answers on 9030; StarRocks reports 3.5.21-85fccf8 with BE 10001 alive; MySQL reports 8.0.46 with a 1 GB buffer pool; the DDL applied clean and created 25 partitions. Pruning cannot be demonstrated yet — the table is empty, so the optimiser short-circuits to EMPTYSET; it is verified after the load. Report →| export.sh | Extract the subset to CSV/TSV with the same predicate on both tables, no ORDER BY, --single-transaction and --quick; verify the count at source on the same predicate and abort if it does not match the lines written. Compression in the pipe: ≈3 GB is 0,03 % of the OCI 10 TB monthly egress allowance, so transfer cost is zero — the reason to compress is time, not money. |
| load.sh | Stream Load over HTTP (8030) with Expect: 100-continue; mandatory check of NumberLoadedRows vs NumberFilteredRows and ErrorURL when rows are rejected; the script fails if filtered rows are not zero. Load errors are read from the BE (8040). |
| Retries | Idempotency via a stable load label, so a retry cannot duplicate rows. |
| Second load | The same CSVs into the MySQL 8.0.46 service with LOAD DATA INFILE, so both engines hold exactly the same content. |
COUNT(*) is 1,309,594 on both engines and 1,309,594 lines in the CSVs; NumberFilteredRows is 0 on both loads (19.1 s + 7.1 s); the three reference counts land at +0.40 %, −0.24 % and +0.60 % of expected; EXPLAIN opens partitions=1/25. MySQL loaded in 379 s. Two semantics traps were caught here and are recorded: StarRocks compares byte-exact while MySQL uses ai_ci, so every Phase 5 query is ASCII-only and wrapped in LOWER(). Full evidence in sql/06_f4_verification.out.txt. Report →| queries/ | Four queries in identical SQL for both engines, no proprietary functions; one native text variant (annex) explicitly marked as non-comparable in the main table. |
| bench.sh | Per query: 2 discarded warm-up runs, 5 measured runs, median and p95, CSV output with engine, query, run, ms, rows returned and a result checksum proving both engines return the same thing. |
| Query profile | Keep the StarRocks profile for Q1 and Q4 (bytes read, time per operator, partition pruning) and EXPLAIN ANALYZE from MySQL. This is the evidence behind "why". |
| Losses | Document Q2-native and Q3 with their cause: InnoDB's inverted index and clustered primary-key access versus planning overhead and the absence of a point index in StarRocks. |
Question · environment · modelling · loading · methodology · results · where it loses · query profile · validity · conclusion. Subset size and recomputed counts open the document. Every number comes from the benchmark CSV; estimates are labelled as estimates.
A script with per-block timestamps, written to be recorded in one take with the terminal visible at the moment the result lands: what gets typed, what appears on screen, and what is said while it runs. It needs a timed rehearsal and a prepared terminal — large font, short prompt, clean history, plus a pre-generated benchmark output as fallback if a query runs long.
| Why a tier is mandatory | The browser cannot query StarRocks: the engine speaks the binary MySQL protocol on 9030, and the FE's HTTP shortcut /api/query answers 501 Not Implemented on 3.5.21 — measured, not assumed. So the dashboard needs one server in between. |
| Runtime | Java 17 + Spring Boot 3, Maven wrapper, port 8080. No ORM: four aggregate queries through JdbcTemplate, mapped to records. An object graph would only get in the way of a GROUP BY. |
| Read path | MySQL Connector/J against the FE on 9030, the same protocol the benchmark used. Never the 8030 endpoint. |
| Endpoints | GET /api/v1/consolidados/por-anio, /por-entidad, /por-departamento, /texto. Year range and row limit as parameters. JSON envelope: data, generatedAt, source, rows. |
| Freshness model | No polling and no scheduled refresh — a reviewer decision, not an omission. Each request asks the engine; the heaviest consolidation measured 334 ms, so the answer is already interactive. An optional 60 s cache sits in front, and ?refresh=true bypasses it. |
| Why no materialised view | At 334 ms a pre-aggregated copy buys no user-visible time and adds a staleness window. It stays a documented option for the day a consolidation crosses ~2 s, and this report records the threshold. |
| Credentials | A read-only user with SELECT on secop, injected as SR_URL / SR_USER / SR_PASSWORD. Never root, never in the repository, and the app refuses to start if they are missing. |
| Failure shape | 503 with a JSON body naming the engine and the reason. The frontend is expected to render it, so it is part of the contract and not an afterthought. |
| Contract first | OpenAPI plus one golden JSON per endpoint committed to the repo, so Phase 9 can be built and reviewed before the API exists. |
| CORS | Only http://localhost:5173. The engine stays on loopback and is never exposed. |
| Scaffold | Vite + React 18 + TypeScript on 5173. No meta-framework: the deliverable is one page, and a router or SSR would add surface without adding an answer. |
| Panels | Four KPIs (rows, total value, entities, contracts with text) and three charts: value by year, top entities, value by department, plus the text-search volume as a table. Same palette as the phase reports so the page reads as part of the same document set. |
| Data layer | TanStack Query with staleTime: 5 min and refetchOnWindowFocus: false. No refetchInterval: a single "Actualizar" button is the only thing that changes a number, which is what "no refreshing" was asked to mean. |
| Builds without a backend | Developed against the golden JSON fixtures of Phase 8, so the page runs with the API stopped and the contract is exercised from both sides. |
| States | Loading skeleton, empty result, and an error panel that names the API and the engine. An empty chart is not an error message. |
| Layout | Readable at 1280 px, keyboard navigable, no colour-only encoding, and charts that degrade to a table when JavaScript is off. |
| Build | npm run build to dist/, servable by any static server. No environment variables baked in beyond the API base URL. |
| Compose | Two services next to the engines: dashboard-api (Spring Boot jar, 8080) and dashboard-web (nginx serving dist/, 5173), with healthchecks and depends_on so the API waits for the FE instead of crash-looping. |
| One command | docker compose up -d brings up engines, API and dashboard together; down leaves nothing running and no volume behind. |
| README | Clone to dashboard in four commands, plus what to do when 9030 is occupied on the host. |
| Close | Screenshots of the three states (loaded, empty, API down) and the phase's own report page, linked from the board like every other phase. |
localhost:5173 with numbers that match 9030.| Scope | Double the visual surface: 22 charts and 5 tables, up from 10 and 1. Five tabs — Overview, Time & money, Geography, Suppliers, Text & records. |
| The cheap half | Ten of the new charts needed no backend: every aggregation already returned a count and a value, and the page was drawing one of the two. |
| The expensive half | Seven new endpoints: median per year (percentile_approx), weekday, year × month, buyer distribution, legal representatives, and a paginated contract table. The two heaviest measured 74 ms together. |
| Why tabs | Each tab enables only its own queries, so the first paint makes 3 requests instead of 17. One global Year lives in the header — two selectors that mirrored each other were worse than one that says so. |
| QA | Twelve rendering defects found by looking at the page, twelve fixed: axes formatted as pesos for counts, colliding donut labels, four-line wrapped categories, rounding collisions in ticks, unordered bands, undercounted tab badges. |
tsc --noEmit clean.The delicate part. A badly chosen subset produces a benchmark that measures the subset, not the engine.
With a 4 GB container the BE cannot afford a working set of tens of gigabytes: page cache becomes the bottleneck and scan queries start hitting disk unpredictably. Hence the ceiling: raw CSV ≤ 3 GB and compressed footprint in StarRocks ≤ 1.5 GB. The budget is set by memory because disk (168.6 GB free on E:) is not the constraint.
| Table | Rows | Payload | Bytes/row | Reading |
|---|---|---|---|---|
secop_i_records | 11,120,877 | 21.89 GB | ≈ 1.97 KB | 85 columns; 4 FULLTEXT indexes inflate the file, not the CSV. |
secop_ii_registros | 5,887,396 | 13.97 GB | ≈ 2.37 KB | 96 columns, 7 FULLTEXT. The heaviest table per row. |
| Both tables | 17,008,273 | 35.86 GB | ≈ 2.11 KB | Files on disk are 43.1 GB because FULLTEXT lives in separate fts_*.ibd. |
At ~2 KB per row, a 3 GB CSV ceiling implies roughly 1.3–1.5 million rows. The exact value is fixed by measurement: k = 13 lands at 1,308,329 rows and ≈2.7 GB, with a 10 % margin under the cap.
Two full SECOP II years and one SECOP I year.
CRC32(UID) % 13 = 0 and CRC32(id_contrato) % 13 = 0.
k reproduce the export byte-for-byte.ORDER BY.Text is the scarce resource: with ~0.2 % match density for computadores, a subset that is too small leaves the text query measuring noise. Thresholds derive from the three validated counts:
| Metric | Source (verified) | Expected at k = 13 | Minimum required |
|---|---|---|---|
bogota in Nombre_de_la_Entidad (SECOP I) | 667,388 | ≈ 51,338 | ≥ 50,000 |
bogota in nombre_entidad (SECOP II) | 70,941 | ≈ 5,457 | ≥ 5,000 |
computadores in Detalle_del_Objeto_a_Contratar | 23,883 | ≈ 1,837 | ≥ 1,500 |
| Total rows in the subset | 17,008,273 | ≈ 1,308,329 | ≥ 1.2 M and CSV ≤ 3 GB |
The middle column is arithmetic on the validated counts at a 13th fraction — an estimate until the export runs. Real values replace it in the report.
COUNT(*) with the exact export predicate, before writing the file.Page one of the report declares: total subset rows, CSV gigabytes, fraction of the original base, and the three recomputed counts next to the reference ones. If the subset is trimmed relative to this proposal, the difference is explained, not smoothed over.
Two where StarRocks is expected to dominate and two where it is expected to lose. That balance is the experiment design, and it is deliberate.
-- identical on both engines SELECT entidad, anio, COUNT(*) AS n, SUM(valor_num) AS total FROM contratos GROUP BY entidad, anio ORDER BY total DESC LIMIT 50;
What it measures: column scan + high-cardinality aggregation + sort. Why StarRocks should win: reads only the columns involved, vectorises the aggregation and never touches whole rows; MySQL walks 16 KB pages row by row. Bias risk: none from parsing — the value is double on both sides, so no cleaning cost can creep in. The outlier recorded in Phase 0 applies equally to both engines.
-- Q2a: identical form, comparable SELECT COUNT(*) FROM contratos WHERE detalle_objeto LIKE '%computadores%';
Q2a (identical): LIKE '%…%' cannot use a FULLTEXT index in MySQL — it means a full row-by-row scan. Here StarRocks usually ties or wins, and that result is reported as it is.
-- Q2b: native form per engine (annex, NOT identical) -- MySQL: MATCH(detalle_objeto) AGAINST ('computadores' IN BOOLEAN MODE) -- StarRocks: inverted index + MATCH_* on the same column
Q2b (native): where MySQL wins clearly, because the 4 FULLTEXT indexes exist precisely for it and answer without reading the table. StarRocks has no equivalent FULLTEXT semantics; its inverted index is a different thing and must be verified on the pinned version. Reporting rule: Q2b sits in a separate table, labelled as a non-identical comparison, and stays out of the main results.
Measured justification: the same question returns 23,372 (FULLTEXT), 23,883 (LIKE) and 5,358 (LIKE BINARY). Mixing operators would let either engine win by changing the question.
-- identical on both engines · same id across the 5 runs SELECT * FROM contratos WHERE id_contrato = ?;
What it measures: latency to fetch one full row by key, planning cost included. Why MySQL should win: InnoDB stores the row inside a clustered tree keyed by primary key — three or four page levels and the row is in memory. StarRocks carries planning overhead and pays for scattered column access. How it is measured honestly: same identifier, 5 runs, and the p95 is reported because the tail is the pain here. A low scanned-rows ceiling is enforced so the query cannot degrade into a scan.
-- identical on both engines SELECT c.nit, c.razon_social, COUNT(*) n, SUM(c.valor_num) total FROM contratos c JOIN entidades e ON c.codigo_entidad = e.codigo WHERE c.anio >= ? GROUP BY c.nit, c.razon_social HAVING COUNT(*) > 1 ORDER BY total DESC LIMIT 100;
What it measures: join + high-cardinality aggregation + filter + top-N. Why StarRocks should win: distributed hash join, vectorised, with a LIMIT that cuts before materialising. Bias risk: if the optimiser picks a different plan than expected, the profile exposes it; the report shows the plan that actually ran.
All four queries use standard SQL, no proprietary functions, the same columns and the same result ordering. Any mandatory syntax difference (date handling, for instance) is isolated in a view or a computed column created identically on both engines, and documented. The single declared exception is Q2b.
| Decision | Rule |
|---|---|
| Repetitions | 2 warm-up runs per query and engine, discarded; then 5 measured runs. |
| Statistic | Median and p95. Never the best time. With five points, p95 is reported as the observed maximum and labelled as such — not dressed up as a robust percentile. |
| Cache state | Warm on both engines, with explicit and identical warm-up before measuring. The cold first read is measured separately as an annex and excluded from the main table. |
| Resource symmetry | Both engines under the same RAM and CPU cap in compose. A 4 GB container against an unthrottled server proves nothing. |
| Client | A single client (the mysql container), no connection reused across engines, timing taken with a monotonic clock rather than the shell's time. |
| Engine result cache | Check and disable any query result cache before measuring; the exact parameter name is recorded when the check is performed, not assumed in advance. |
| Result equivalence | Each run stores a checksum of its result. If the two engines disagree, the timing is not compared: the query is fixed first. |
| Evidence of "why" | StarRocks query profile (bytes read, time per operator, partition pruning) and MySQL EXPLAIN ANALYZE for Q1 and Q4; for Q2 and Q3, the plan that explains the loss. |
| Record | CSV columns: engine, query, run, ms, rows returned, result checksum, plus context fields (engine version, date, dataset hash). |
The win/tie/loss thresholds in section 1 are fixed before seeing numbers. If they have to change after measuring, the change and its reason are recorded.
Phase 0 measured this server at 122 MB/s scanning SECOP I and 87 MB/s scanning SECOP II, with a 3 GB buffer pool. StarRocks runs on a different machine, so the comparison is engine-to-engine on equivalent resource caps — the baseline is context, not the opponent.
| File | Phase | Minimum content | Acceptance |
|---|---|---|---|
docker-compose.yml | 3 | Pinned version with digest, explicit mem_limit, capped CPUs, ports 9030/8030/8040, volume, healthcheck, symmetric MySQL 8.0.46 service. | Boots clean and both engines answer. |
ddl.sql | 3 | Duplicate Key, year partitioning (plus unknown-year partition), buckets, replication_num = 1, and one comment per decision giving the reason and the discarded alternative. | Applies without warnings; comments justify every choice. |
export.sh | 4 | Single predicate, consistent snapshot, count verification, abort on deviation, gzip in the pipe. | Source count = exported lines. |
load.sh | 4 | Stream Load with idempotent label; compares NumberLoadedRows vs NumberFilteredRows; prints ErrorURL on rejects. | Filtered = 0 and count matches the CSV. |
docs/phase-N-report.html | 0–10 | One report per closed phase: what was measured, what failed, what was decided and the gate that closed it. Shared stylesheet report.css. | Linked from the board in three places; every figure traceable to an evidence file. |
queries/ | 5 | Q1, Q2a, Q3, Q4 identical, plus Q2b kept separate and labelled. | Run on both engines with identical checksums (except Q2b). |
bench.sh | 5 | 2 warm-ups + 5 runs, median and p95, CSV output. | Repeatable: two executions agree within 10 % on medians. |
INFORME.md | 6 | 12 blocks and 10 charts; subset size on page one; a losses section with mechanism; exact Mann–Whitney with n = 5 disclosed. | Every figure traceable to a CSV row. |
video.md | 7 | Six-minute script with timecodes, single take, terminal visible. | Timed rehearsal ≤ 6:00. |
dashboard-api/ | 8 | Spring Boot service exposing eleven consolidations over JDBC to port 9030: read-only user from the environment, golden JSON fixtures, 503 when the engine is down. | Numbers match a manual query; boots with no credential in the repo. |
dashboard-web/ | 9 | Vite + React page in English: a four-card SECOP explainer, six KPIs, ten charts, a single manual refresh, explicit error state. | Panels match the API payload; refresh is the only trigger. |
Not deliverables, but required for an auditable report: schema-notes.md (Phase 0, already written), the Phase 0 report and the benchmark CSV. All three stay in the repo even though they are not presented.
About seven and a half working days, with Phase 0 already spent. The original 5.8 days grew by 1.75 on 2026-11-25, when the dashboard phases were added. Durations are estimates, not measured commitments. Phase 1 runs in parallel with the tail of Phase 0 and the start of Phase 2, so the image pull never sits on the critical path.
Subset approval → Phase 4 → Phase 5 → Phase 6. Access is no longer on the path: it was the original bottleneck and it is closed. A day lost pulling images still costs nothing, which is why Phase 1 is scheduled early and off the path. Phases 6 and 7 cannot overlap Phase 5: the report is written on closed numbers, the video on a finished report. Phases 8 to 10 sit off that chain — F8 can start in parallel with the video — and are drawn sequentially only so the bar shows the real total.
| Risk | Impact | Mitigation |
|---|---|---|
| StarRocks runs out of memory at 4 GB and the BE dies | High | 3 GB CSV ceiling, explicit BE limit, watch logs on 8040, shrink the subset rather than raise memory (raising it would break the reproducibility premise). |
| Engines return different results | High | Per-run checksum; on mismatch no timing is reported. Typical causes: collation, or a SUM over text. |
| Value column has 10.9 % zeros and one 3.64e14 outlier | Medium | Not cleaned — both engines must see identical data. The report names the outlier so Q1 is not read as a volume win. |
| Text query lacks critical mass | Medium | Minimum match thresholds in the size rule; k = 13 already clears all three. |
| 1.58 M rows have no year | Medium | Explicit unknown-year partition in the DDL; otherwise date-filtered queries quietly drop 9 % of the corpus. |
| Expression partitioning unsupported on the pinned build | Closed | Refuted: date_trunc('year', …) works on 3.5.21. RANGE is used for a different reason — 1.58 M rows without a date. |
| Image pull blocked, throttled, or silently re-tagged | Medium | Pulled in Phase 1, out of the critical path, with digests recorded. Fallback: authenticated pull, mirror, or docker save/docker load. A moved tag is caught because compose pins the digest, not the name. |
| Source statistics mislead a later step | Low | TABLE_ROWS is off by two orders of magnitude on this schema; every step uses COUNT(*), and the DDL comments say so. |
| Bias from asymmetric resources | Medium | Identical RAM/CPU limits in compose, declared in the report. |
| Video overruns six minutes | Low | Timed rehearsal, prepared terminal, predictable benchmark output and a pre-generated fallback. |
| Decision | Status | Note |
|---|---|---|
| Report first, video second | Closed | The video consumes closed figures; never the other way round. |
| Include losses: text and point lookup | Closed | Q2 and Q3 exist for this. Without them the report is worthless. |
| Single take, terminal visible | Closed | Constrains the script: everything shown must fit in real time. |
Single BE ⇒ replication_num = 1 | Closed | Explained in the DDL as a consequence of the environment, not as a production recommendation. |
| Read-only access over SSH + socket | Closed | B1 resolved; port 3306 stays closed to the internet. |
| Value column is numeric | Closed | B3 resolved by measurement: double, no separators. |
| Modulo sampling instead of year slicing | Closed | k = 13 approved; landed at 1,309,594 rows, 0.69 GB. |
| Exact StarRocks version | Closed | 3.5.21-85fccf8, pinned by digest in the compose file. |
| Queries must be collation-neutral | Closed | StarRocks compares byte-exact, MySQL defaults to ai_ci: the same LIKE '%bogota%' returns 0 and 51,545. Every query is ASCII-only and wrapped in LOWER(), otherwise the benchmark measures collation, not the engine. |
| Dashboard backend in Java Spring Boot | Closed | Chosen by the reviewer. JDBC to the FE on 9030; the HTTP shortcut /api/query answers 501 on 3.5.21, so no framework could have avoided the API tier anyway. |
| No automatic refresh anywhere | Closed | Decided 2026-11-25: no MV schedule, no UI polling. Each request reads the engine (334 ms measured for the heaviest consolidation); the only refresh is the user pressing the button. |
| Distinct counts are not comparable | Closed | COUNT(DISTINCT entidad) gives 13,270 vs 13,252 on identical rows, because ai_ci merges accented variants. Any such query is labelled non-comparable rather than reported as a difference. |
What had to exist before the first line of lab code — and what already does.
129.80.141.192.B1 · doneschema-notes.md.Phase 0 · donestarrocks/allin1-ubuntu → 3.5.21.done.wslconfig, ports free.doneRepoDigests in the compose file.done| # | Action | Owner | Blocking |
|---|---|---|---|
| 1 | Approve subset k = 13 (or request a different size) | Reviewer | Done |
| 2 | Pin StarRocks tag + digest in compose | Lab | Done |
| 3 | Verify Docker engine, resource cap, free ports | Lab | Done |
| 4 | Pull both images, confirm AVX2 + JDK 17 inside | Lab | Done |
| 5 | Write compose + DDL, run the partition test | Lab | Done |
| 6 | Approve the dashboard scope: four consolidations, no auto-refresh | Reviewer | Done |
| 7 | Choose the dashboard backend | Reviewer | Done · Spring Boot |
| 8 | Create a SELECT-only StarRocks user for the API | Reviewer | Done · secop_reader |
All eight actions are closed. The read-only user exists (secop_reader) and the API connects as it. The open one is operational: the lab has no user other than root without a password, and the plan forbids the dashboard API from running as root, so a SELECT-only user has to exist before Phase 8 can be called done. Everything else — subset, images, DDL, export, benchmark, report and the dashboard scope — is decided and measured.