A React-based dashboard for analyzing and visualizing MySQL/MariaDB slow query logs. Upload your slow query log files and get detailed performance insights with interactive charts and statistics.
- File Upload Processing: Drag and drop slow query log files directly in your browser
- Query Pattern Recognition: Automatically groups similar queries by normalizing SQL syntax
- Performance Metrics: Tracks query execution time, rows examined, lock time, and other MySQL metrics
- Interactive Dashboard: Multi-tab interface with comprehensive analysis views:
- Performance Tab: Overview with distribution charts and performance alerts
- Top Queries Tab: Time-based ranking of slowest queries
- Query Types Tab: SQL operation breakdown (SELECT, INSERT, UPDATE, DELETE)
- Analysis Tab: Scatter plot analysis for advanced performance insights
Visit the live application at: https://bobuss.github.io/slow-query-analyser/
-
Clone the repository
git clone <repository-url> cd slow-query-analyser
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open your browser to http://localhost:3000
-
Upload a slow query log file and start analyzing!
-
Prepare your slow query log: Enable MySQL/MariaDB slow query logging:
SET GLOBAL slow_query_log = 'ON'; SET GLOBAL long_query_time = 1; SET GLOBAL slow_query_log_file = '/path/to/slow-query.log';
-
Upload the log file: Use the file upload interface in the application
-
Analyze results: Navigate through the different tabs to explore:
- Query patterns and frequency
- Performance bottlenecks
- Resource usage statistics
- Query execution trends
The application parses standard MySQL/MariaDB slow query log format including:
- Query execution time and lock time
- Rows sent and examined
- Temporary tables and full table scans
- User and host information
- Complete SQL query text
npm run dev
- Start development server (port 3000)npm run build
- Build for productionnpm run preview
- Preview production build
Built with modern web technologies:
- React 18 with hooks for state management
- Vite for fast development and building
- Recharts for interactive data visualizations
- Lucide React for clean UI icons
- Tailwind CSS for responsive styling
SlowQueryDashboard
- Main application componentparseSlowQueryLog
- Log file parsernormalizeQuery
- SQL query pattern normalizer- Multiple chart components for data visualization
- Modern browsers with ES6+ support
- File API support required for log file uploads
- No server-side processing needed - runs entirely in the browser
MIT License - see LICENSE file for details.
The application is automatically deployed to GitHub Pages on every push to the main branch via GitHub Actions.
If you want to deploy to your own GitHub Pages:
-
Enable GitHub Pages in your repository settings:
- Go to Settings → Pages
- Source: Deploy from a branch → GitHub Actions
-
Push to main branch - the workflow will automatically build and deploy
-
Access your app at
https://bobuss.github.io/repository-name/
The deployment workflow:
- Builds the React app using Vite
- Generates static files in the
dist
folder - Deploys to GitHub Pages automatically
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Note: This tool processes slow query logs locally in your browser. No data is sent to external servers, ensuring your database performance data remains private and secure.