建议删除TableController.php 下面的count统计查询
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 62/100
Research direction
Start in TableController.php and inspect the shown table-listing code, especially the per-table Util::db()->table($table_name)->count() calls. Remove the count-query block and verify that table listing still works without replacing TABLE_ROWS values; check any existing controller or integration tests if available.
Written by the indexing model from the issue text.
Description
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;
}
}
建议删除掉这段代码,当你得数据库单表数量高时查询会变得非常慢,这个数量看不看影响都不大。
- Dominant language
- JavaScript
- Stars
- 378
- Forks
- 48
- Avg merge
- 20h 9m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from webman-php/admin
-
js代码错误 Open
Difficulty 1/5 Under an hour Newbie friendliness 70/100
webman-php/admin#125 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
webman-php/admin#135 ·
-
在swoole驱动环境下,会出现问题 Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
webman-php/admin#133 ·
-
layui升级问题 Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
webman-php/admin#129 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
webman-php/admin#127 ·
All issues in webman-php/admin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·