View Categories

Large tables & performance

Three ways to improve performance! There are more…
  • Skip estimated row counts
  • Force user to press ENTER on new search
  • Progressively SHOW MORE button

Skip estimated row counts #

Tables are using pagination by default. Although pagination improves the user experience, it slows down performance, especially for large tables. Pagination requires counting:
  1. All table rows
  2. All matching table rows

These counts consume resources and may slow down performance.

A row count estimate can be used to prevent row counts on every page view. Calculated and hard estimates can be defined for InnoDB tables, federated tables and views in the Data Explorer. The following summary information is shown for tables having the estimated row count enabled.
Without a filter:
~Showing 1 to 10 of 12,565,527 entries

With a filter:

~Showing 1 to 10 of 7017 entries (filtered from 12,565,527 total entries)

The estimated row count feature only eliminates the first row count mentioned earlier. The second row count (with filter) is still needed to show the number of entries (see information summary above). Unfortunately, this is mostly the most resource consuming query of all.

Data Tables supports option wpda_use_estimates_only to prevent this query as well. This option elimates the second large table horror count at the cost of incomplete summary information. As a result, queries on a table containing > 12.5 millions rows are lightning fast, even with a filter. But the summary information always shows:

~Showing 1 to 10 of 12,565,527 entries

And does not contain the number of rows filtered.

The following advance table setting will force the plugin to use only estimates

{ "wpda_use_estimates_only": true }
A search box is added to each data table by default. To prevent sending a request on every key pressed, the user needs to press the enter key explicitly. This is the default behavior since version 5.1.2 and helps to reduce network traffic and boost performance. The wpda_search_force_enter  option can be used the change this behavior. If set to false a request is send on each key pressed. Do not change this behavior for large tables!

Progressively SHOW MORE button #

The SHOW MORE button completely disables pagination. This also elimates the two earlier mentioned count statements, and can therefor be regarded as an alternative for the estimated row count feature, especially with large tables. The SHOW MORE button feature is part of the free version.