Scaling

The system is built in a way that can comfortably handle very large amounts of parcel data, even hundreds of thousands of records, as long as it’s running on decent hosting.

The database is already structured properly for scale:

  • Important fields like tracking number, status, month, and courier are indexed for speed.
  • The parcel list only loads 25 records at a time instead of trying to load everything at once.
  • Background requests (AJAX) are lightweight and scalable.
  • CSV imports are processed in batches instead of all at once.

So overall, the system itself is stable and won’t “break” under high usage.

Current performance concerns

Analytics dashboard

The analytics section currently recalculates everything from the full database every time the page loads. Once the database grows beyond roughly 500,000 records, this can become slow and delay the dashboard loading. The filter dropdowns (statuses, countries, months) also scan the entire database each time the dashboard opens.

Solution:
Instead of live analytics calculations, we’ll switch to generated reports and downloadable PDF summaries. This removes the heavy processing completely.

Search performance

The original search method searched through every row in the database each time someone typed something. That works fine for small datasets, but becomes very slow at scale.

We replaced this with a smarter search system:

  • Tracking numbers now use indexed searches, which are extremely fast.
  • Names and notes now use MySQL FULLTEXT search, which is designed specifically for large-scale text searching.
  • Searches automatically route differently depending on what the user types.

Examples:

Typing a tracking number → uses fast indexed lookup
Typing a person’s name → uses FULLTEXT search
Very short searches → uses a lightweight fallback method

This avoids full database scans and keeps searches fast even with millions of rows.

CSV upload limitations

Very large CSV uploads could previously fail because everything processed in one request, and most hosting providers limit how long a request can run. This becomes a problem with extremely large monthly imports.

Database improvements confirmed

The system now:

  • Automatically creates the FULLTEXT search indexes when the plugin updates
  • Safely upgrades older installations automatically
  • Requires no manual setup
  • Uses optimized indexes for the most commonly filtered fields

Future scalability option

If the platform grows significantly larger in future, we can move searching to a dedicated search engine like Elasticsearch or Meilisearch.

That would provide:

  • Near-instant searching at any scale
  • Typo tolerance
  • Smarter matching
  • Unified searching across parcels and WooCommerce products

But right now, that level of infrastructure isn’t necessary.

Final summary

The platform architecture is already strong and scalable. The only real bottlenecks were:

  • live analytics calculations
  • the old search method
  • extremely large CSV uploads

The search system has now been upgraded to scale properly, analytics will move to generated reports instead of live calculations, and the rest of the system is already capable of handling very large datasets reliably.

Leave a Reply

Your email address will not be published. Required fields are marked *