Skip to content

建议删除TableController.php 下面的count统计查询 #101

@tojike

Description

@tojike

if ($tables) { $table_names = array_column($tables, 'TABLE_NAME'); $table_rows_count = []; foreach ($table_names as $table_name) { $table_rows_count[$table_name] = Util::db()->table($table_name)->count(); } foreach ($tables as $key => $table) { $tables[$key]->TABLE_ROWS = $table_rows_count[$table->TABLE_NAME] ?? $table->TABLE_ROWS; } }
建议删除掉这段代码,当你得数据库单表数量高时查询会变得非常慢,这个数量看不看影响都不大。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions