Phpmyadmin extremely slow on view. Ability to disable row editing on view to speed up display
#18,539 创建于 2023年7月17日
仓库指标
- Star
- (6,886 star)
- PR 合并指标
- (平均合并 2天 17小时) (30 天内合并 11 个 PR)
描述
When I execute resquests on specific views, returning small number of results (30 results), the query is executed instantaneously on mysql (eg. 0.009), but display in phpmyadmin lasts for minutes (even if displayed execution time is the same)
Some tables used by the view have large number of records.
Looking deeply on phpmyadmin code, I found out that the culprit is this part of code in library/classes/Display/Results.php
/**
* The result set can have columns from more than one table,
* this is why we have to check for the unique conditions
* related to this table; however getUniqueCondition() is
* costly and does not need to be called if we already know
* the conditions for the current table.
*/
if (! isset($whereClauseMap[$rowNumber][$meta->orgtable])) {
[$uniqueConditions] = Util::getUniqueCondition(
$this->properties['fields_cnt'],
$this->properties['fields_meta'],
$row,
false,
$meta->orgtable,
$expressions,
);
$whereClauseMap[$rowNumber][$meta->orgtable] = $uniqueConditions;
}
If my undestanding is correct, the purpose of this function is to check the unique conditions related to the view, do allow the editing of lines.
Since I never do editing on views, I'd like to be able to disable this functionnality and to allow the display of results quicker.