Latest version 2.7.6 available

Database Indexes

 

What This Module Does

The Database Indexes module analyzes your WordPress and WooCommerce database to find ways to make it faster and more efficient. Think of database indexes like the index in the back of a book - they help you find information quickly without having to read through every page.

How It Helps Your Website

Faster Page Loading

When your database has proper indexes, it can find the information needed to display a page much faster. This means your visitors see content quicker and have a better experience on your site.

Reduced Server Load

Optimized indexes require less work from your server. Your hosting can handle more visitors at the same time, and you may avoid needing to upgrade to more expensive hosting plans.

Smart Recommendations

The module looks at your specific database and gives you personalized suggestions. It identifies indexes that are missing and would help your site, as well as indexes that are duplicated or unnecessary and are wasting space.

What the Module Analyzes

WordPress Core Tables

Checks the main WordPress tables (posts, users, comments, etc.) to ensure they have the indexes needed for optimal performance. These are the tables that store your website's core content.

WooCommerce Tables

If you use WooCommerce, the module analyzes your store's tables to find missing indexes that could slow down product searches, order processing, and customer browsing.

Duplicate Indexes

Finds indexes that are exact copies of each other. Having duplicate indexes wastes storage space and slows down database updates because the database has to maintain multiple copies of the same index.

Covered Indexes

Identifies indexes that are "covered" by other indexes. For example, if you have an index on columns A and B, and another index just on column A, the single-column index is redundant because the multi-column index can do the same job.

Performance Analysis

Shows you which tables are the largest, which ones have too many indexes, and provides an overall picture of your database health.

How to Use the Module

Step 1: Run the Audit

Click the "Run Index Audit" button. The module will analyze your database section by section. This may take a few minutes depending on your database size.

Step 2: Review the Results

The audit results are organized into clear sections:

  • Summary: Shows the total indexes found and any issues detected
  • WordPress Core Tables: Lists any missing indexes in WordPress tables
  • WooCommerce Tables: Lists any missing indexes in WooCommerce tables (if applicable)
  • Duplicate Indexes: Shows groups of duplicate indexes that can be removed
  • Covered Indexes: Shows redundant indexes that are covered by other indexes
  • Performance Analysis: Shows database size and table statistics

Step 3: Generate SQL Commands

For sections with issues, you can click "Generate SQL Fixes" to get the exact database commands needed to fix the problems. These commands are ready to copy and run.

Step 4: Apply Fixes (Optional)

You can copy the SQL commands and run them in your database management tool (like phpMyAdmin). The module never makes changes automatically - you are always in control.

Safety Features

No Automatic Changes

The module only analyzes and reports. It never modifies your database without your explicit action. You review all recommendations first.

WordPress Default Protection

The module knows which indexes are created by WordPress by default and will never recommend removing them. This protects your site's core functionality.

Risk Assessment

Each recommendation includes a risk level:

  • Safe: Can be removed without concern
  • Caution: Should be tested on a staging site first
  • High Risk: Requires expert review before making changes

Backup Reminder

The module always reminds you to backup your database before running any SQL commands.

When to Use This Module

After Installing New Plugins

New plugins may create indexes that duplicate existing ones or are not optimally designed.

When Your Site Feels Slow

If pages are loading slowly, missing database indexes could be the cause.

Regular Maintenance

Running the audit periodically helps keep your database optimized as your site grows and changes.

Before Major Changes

Check your database health before making significant changes to your site structure or content.

What the Results Mean

Missing Indexes

These are indexes that should exist but don't. Adding them can significantly improve query performance.

Duplicate Indexes

These are exact copies of existing indexes. Removing them saves storage space and speeds up database updates.

Covered Indexes

These are indexes that are made redundant by other indexes. Removing them is generally safe and improves performance.

Over-Indexed Tables

Tables with too many indexes (more than 50% of their size is indexes) may benefit from removing some indexes.

Technical Details (For Advanced Users)

The module uses the WordPress database API to safely query INFORMATION_SCHEMA and analyze index structures. It implements sophisticated algorithms to detect:

  • Exact duplicates (same columns in the same order)
  • Covered indexes (prefix relationships)
  • Selectivity analysis (how unique index values are)
  • Foreign key relationships
  • WordPress default index patterns

All SQL commands are generated with proper escaping and validation to prevent SQL injection attacks.

All rights reserved. 2025