_last_n_results (Status, the monitors list, host monitors), host_status (hosts overview, list_hosts) and the report's down-monitor list each ranked every result a monitor ever recorded to keep the newest few. Each monitor now gets ORDER BY checked_at DESC LIMIT n in a LATERAL subquery, which walks ix_monitor_results_monitor_checked backwards and stops. Also fixes the latest-table test, which read between two begin() blocks and so autobegan a transaction the second block then refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>