Files
red-valley/docs/db_optimization_notes.md

29 lines
901 B
Markdown
Raw Normal View History

2026-03-29 21:41:17 +03:00
# Database — Note & Tasks
## SQL Housing Fix (DONE ✅)
- [x] Go to SQL tab in phpMyAdmin
- [x] Execute initial ALTER and CREATE TABLE statements
- [x] Check if `player_houses` table has `credit` column
- [x] Execute `credit` column additions if necessary
- [x] Final verification and report
**DB**: `red-valley``http://localhost/phpmyadmin/`
---
## crypto_history Optimization (PENDING ⚠️)
- [x] Run initial query to check row count and date range
- **Total**: 2,343 rows
- **Range**: 2026-02-11 → 2026-03-03
- [ ] Delete rows older than 7 days
- [ ] Run final query to confirm remaining count
> [!WARNING]
> Tabelul `crypto_history` are 2,343 rânduri și generează un **oxmysql oversized query** la fiecare SELECT *. Trebuie adăugat LIMIT sau șters periodic.
**SQL de curățat:**
```sql
DELETE FROM crypto_history WHERE created_at < DATE_SUB(NOW(), INTERVAL 7 DAY);
```