Count rows only if needed #14607
Labels
enhancement
A feature request for improving phpMyAdmin
has-pr
An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
help wanted
Milestone
Currently the PhpMyAdmin counts the total rows of a query result every time when LIMIT is not present.
If LIMIT is not presented in the user query, default LIMIT (like LIMIT 0, 50) is appended to the query.
But currently the total rows count is queried even when the total rows are below the default limit. This is not needed as has very large impact on long running queries.
Example:
User query:
PhpMyAdmin sends to DB:
and gets exactly one row.
But the PhpMyAdmin sends additional unneeded query:
which is never needed if the rows count of the previous query was below the limit (exactly below max. count as LIMIT clause can have offset).
The text was updated successfully, but these errors were encountered: