Files
blog/content/posts/commits/2026-02-07-commit-3c5ad95.md
Betty 7ac1bd5f4f
All checks were successful
Hugo Build & Deploy / build-deploy (push) Successful in 5s
Add 62 blog posts generated from git commit history
One-shot import of all bojemoi repo commits as Hugo posts.
Each post includes metadata, files changed, and diff stats.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:16:05 +01:00

43 lines
1.0 KiB
Markdown

---
title: "Fix borodino SQL queries: replace ORDER BY RANDOM() with TABLESAMPLE SYSTEM()"
date: 2026-02-07T00:55:23+01:00
draft: false
tags: ["commit", "bojemoi", "fix", "borodino"]
categories: ["Git Activity"]
summary: "Commit 3c5ad95 par Betty — 3 fichier(s) modifié(s)"
author: "Betty"
---
## Commit `3c5ad95`
| | |
|---|---|
| **Repository** | bojemoi |
| **Branch** | `main` |
| **Auteur** | Betty |
| **Hash** | `3c5ad95aae949058e25c9b7ee4bb20ccf2620995` |
| **Date** | 2026-02-07 |
### Description
ORDER BY RANDOM() on hosts table (6.15M rows) caused full sequential scans
taking ~7.5s each, driving PostgreSQL to 459% CPU. TABLESAMPLE SYSTEM()
samples random blocks at I/O level, reducing query time to milliseconds.
Also fixes SQL injection in thearm_uzi via parameterized query.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
### Fichiers modifiés
```
M borodino/thearm_ak47
M borodino/thearm_bm12
M borodino/thearm_uzi
```
### Statistiques
```
3 files changed, 3 insertions(+), 3 deletions(-)
```