ggergo/sqlindexhintbundle
最新稳定版本:v1.1.2
Composer 安装命令:
composer require ggergo/sqlindexhintbundle
包简介
Doctrine SqlWalker extension to apply USE INDEX and FORCE INDEX hints using DQL on top of MySql. Works with both createQuery and createQueryBuilder.
关键字:
README 文档
README
Doctrine SqlWalker extension to apply USE INDEX and FORCE INDEX hints using DQL on top of MySQL.
Works with both createQuery() and createQueryBuilder().
You can set different index hints per DQL table aliases.
Getting Started
Example:
use Ggergo\SqlIndexHintBundle\SqlIndexWalker; use Doctrine\ORM\Query; // ... $query = '...'; $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, SqlIndexWalker::class); $query->setHint(SqlIndexWalker::HINT_INDEX, [ 'your_dql_table_alias' => 'FORCE INDEX FOR JOIN (your_composite_index) FORCE INDEX FOR ORDER BY (PRIMARY)', 'your_another_dql_table_alias' => 'FORCE INDEX (PRIMARY)', // ... ]);
Installing
Require with Composer, i.e.:
composer require ggergo/sqlindexhintbundle
统计信息
- 总下载量: 473.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04