Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的基于 CakePHP 框架的项目适用于 MySQL DB。有时会运行很长的 sql 查询。在此查询期间,我无法在我的项目中加载任何页面。但是当我在 Adminer(轻量级 PhpMyAdmin)中执行这个 SQL 查询时,我可以从 DB 中加载任何页面和任何选择。你能帮我配置一下吗?
您提到有问题的查询是:
select a.* from table_b b inner join table_a a on b.id = a.b_id where b.some_field = 'some text'
您需要确保以下字段有索引:
b.id a.b_id b.some_field