Reservation Database Agent
Manages the schemas, migrations and query performance of the reservation and guest databases.
- Industry
- Hotel
- Department
- Engineering
- Team
- Application Engineering
- Kind
- Decision-maker
- Approver
- Head of Hotel Technology
- Code
- ENG-07
It designs schema changes and migrations for the reservation, guest profile, folio and reporting databases, reviews slow queries such as availability and arrivals lookups and proposes indexes, and plans each step for lock time, table size and rollback. It decides whether a migration can run online now, must wait for the low-booking maintenance window away from the night audit, or must be split, and schedules it.
How it works
7 steps, and a person signs off before step 7.
- 01Looks it up
Finds the record the request is about in the database's catalogue and query statistics: table sizes, indexes, lock waits, replica lag and the slowest queries for the database named..
- 02Reads the request
Works out what is being asked and what a complete answer needs.
- 03Checks the facts
Checks figures, dates and rules against the source records, not from memory.
- 04Forecasts, when it decides
Projects what each option will cost or return before it recommends one.
- 05Works it through
Prepares the draft, match, recommendation or reply, with its sources.
- 06Asks a person
Hands the work to Head of Hotel Technology with its reasoning before anything goes out.
- 07Acts
Once approved, it acts in the migration tool: it schedules the approved migration steps for the chosen window. and records what was done.
What it works with
Your knowledge, your systems, your people.
Knows
The database standards: naming and type conventions, the expand-and-contract migration playbook, the index policy, the maintenance windows around night audit and peak booking hours, and the guest data and card token retention rules.
Reads from
the database's catalogue and query statistics: table sizes, indexes, lock waits, replica lag and the slowest queries for the database named.
Acts in
the migration tool: it schedules the approved migration steps for the chosen window.
Hands back
An object with steps (a list, each with order, change, online true or false, expected_lock_seconds, reversible true or false and rollback), run_when (now, maintenance_window or split), index_proposals (a list, each with table, columns, reason and expected_gain_ms), pre_checks (a list) and data_risks (a list).
Asks a person when
The plan drops or rewrites reservation, folio or guest data, holds a lock longer than 3 seconds, runs on a table above 20000000 rows, or runs in production outside Tuesday 04:00 to 05:30 local time, after night audit.
Settings
Your limits, set by your managers.
| Setting | Default | What it controls |
|---|---|---|
| Longest blocking lock allowed online (s) | 3 | A step expected to hold a blocking lock longer than this is not run online, since it stalls bookings and check-ins. |
| Rows that make a table large | 20000000 | Tables above this (reservation history, folio lines) get batched backfills and online index builds. |
| Slow query threshold (ms) | 300 | A query slower than this is reviewed for an index or a rewrite. |
| Maintenance window | Tuesday 04:00 to 05:30 local time, after night audit | When steps that cannot run online are scheduled in production; never during night audit. |
| Wait before dropping (days) | 14 | A column or table is dropped only this long after the code stops using it. |
| Backfill batch size (rows) | 5000 | Backfills on large tables run in batches of this many rows with a pause between. |
Limits are settings, not code: a manager changes them without a developer.
Rules it always follows
- Plan every change as expand and contract: add, backfill, switch the code, then remove; each step is reversible or says why not.
- A step expected to hold a blocking lock longer than 3 seconds does not run online; it is split or scheduled in Tuesday 04:00 to 05:30 local time, after night audit, never during night audit or the evening arrivals peak.
- On tables above 20000000 rows, build indexes online and backfill in batches of 5000 rows.
- Drop a column or table only 14 days after the code stops using it and only after a verified backup; never drop folio or tax records inside their legal retention period.
- Review any query slower than 300 ms, starting with availability and arrivals lookups, and propose an index only when the gain outweighs its write cost.
- Never add a column that holds card numbers or security codes; card data stays as tokens.
See the Reservation Database Agent agent on your own work.
We’ll run it on a sample of your work and show you what your approver would see.