Enhance the performance of your Laravel applications by identifying and optimizing slow database queries with Laravel Slower.
Laravel Slower is designed to help developers identify slow database queries and provides AI-powered recommendations to optimize these queries. The package can be integrated seamlessly into any Laravel project and offers configurable options for both manual and automated performance tuning.
To install the package via Composer, run the following command in your terminal:
composer require halilcosdu/laravel-slower
After installation, you need to publish the configuration file to set up your preferences:
php artisan vendor:publish --tag="slower-config"
The config/slower.php
file allows you to customize various aspects of the package:
Integrate Laravel Slower into your application to monitor and optimize database performance.
To start monitoring your database queries, add the following commands to your console kernel:
php artisan slower:analyze
This command analyzes the queries that exceed the defined slow query threshold and logs them for review.
If AI recommendations are enabled, the package will suggest optimizations based on the analysis of slow queries. You can view these recommendations in the database logs or through the application's log viewer.
If you encounter issues with Laravel Slower, consider the following troubleshooting steps:
For more detailed usage examples, configuration settings, and community contributions, please visit the Laravel Slower GitHub repository:
Your contributions to improving Laravel Slower are welcome. Please refer to the contributing guidelines on our GitHub repository to get started.