nunomaduro/laravel-optimize-database
ุญูู
๐จ Provides a good starting point for production-ready SQLite databases
ุงูุจูุงูุงุช ูุงูุชุญูููุงุชุงููู ู ุงูู ูุงุณ ูููุฌูู
- ุฎูุงู 24 ุณุงุนุฉ
- ู
- ุฎูุงู 7 ุฃูุงู
- ู
- ุฎูุงู 15 ููู ูุง
- ุ-ูก
- ุฎูุงู ุดูุฑ
- ุฌุงุฑู ุฌู ุน ุงูุณุฌู
ุชุบููุฑ ุตุงูู ุงููุฌูู ุฎูุงู ูุชุฑุงุช ู ุชุฏุงุฎูุฉุ ูููุณ ู ุฌู ูุนูุง ููู ููุง. ุชุจูู ุงูููุงุณุงุช ุงูู ูููุฏุฉ ูุงุฑุบุฉ. ุงููุฌูู ุชููุณ ุงูุงูุชู ุงู ูุง ุฌูุฏุฉ ุงูุจุฑู ุฌูุงุช.
README.md
ุงูุฃุตู
This package is a work-in-progress, therefore you should not use it in production - and always backup your database before requiring it through Composer.
This package provides a simple way to optimize your SQLite database in Laravel; it's a good starting point for production-ready SQLite databases. At the time of this writing, it applies the following settings:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโฌโโโโโโโโโโโโ
โ Setting โ Value โ Via โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโผโโโโโโโโโโโโค
โ PRAGMA auto_vacuum โ incremental โ Migration โ
โ PRAGMA journal_mode โ WAL โ Migration โ
โ PRAGMA page_size โ 32768 โ Migration โ
โ PRAGMA busy_timeout โ 5000 โ Runtime โ
โ PRAGMA cache_size โ -20000 โ Runtime โ
โ PRAGMA foreign_keys โ ON โ Runtime โ
โ PRAGMA incremental_vacuum โ (enabled) โ Runtime โ
โ PRAGMA mmap_size โ 2147483648 โ Runtime โ
โ PRAGMA temp_store โ MEMORY โ Runtime โ
โ PRAGMA synchronous โ NORMAL โ Runtime โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโดโโโโโโโโโโโโ
The settings are applied in two ways:
- Migration Stub - Applied via migration.
- Runtime Configuration - Applied at runtime, via service provider.
๐ Installation
Requires PHP 8.2+, SQLite 3.46+ and Laravel 11.0+
You can install the package via Composer:
composer require nunomaduro/laravel-optimize-database
๐ Usage
To get started optimizing your SQLite database, you need to run the following command:
php artisan db:optimize
At this point, the [Runtime] settings are applied automatically. However, you need to run the migration to apply the [Migration] settings:
php artisan migrate
Laravel Optimize Database was created by Nuno Maduro under the MIT license.
ุงุณุชูุดู ู ุดุงุฑูุน ู ุดุงุจูุฉ ูู ุฑุชุจุทุฉ
ุฌุงุฑู ุงูุชุญู ููโฆ