PHPackages                             ggergo/sqlindexhintbundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ggergo/sqlindexhintbundle

Abandoned → [shipmonk/doctrine-mysql-index-hints](/?search=shipmonk%2Fdoctrine-mysql-index-hints)Library[Database &amp; ORM](/categories/database)

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.

v1.1.2(4y ago)14499.2k—1.6%8[1 PRs](https://github.com/ggergo/SqlIndexHintBundle/pulls)MITPHPPHP ^7.1 || ^8.0

Since Jun 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ggergo/SqlIndexHintBundle)[ Packagist](https://packagist.org/packages/ggergo/sqlindexhintbundle)[ RSS](/packages/ggergo-sqlindexhintbundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (10)Used By (0)

USE INDEX and FORCE INDEX using Doctrine MySQL
==============================================

[](#use-index-and-force-index-using-doctrine-mysql)

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
---------------

[](#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

[](#installing)

Require with Composer, i.e.:

```
composer require ggergo/sqlindexhintbundle
```

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~74 days

Recently: every ~143 days

Total

9

Last Release

1562d ago

PHP version history (2 changes)v1.0.0PHP ^7.1

v1.1.1PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/22af1787d372106e16f30abe8340a859872db33ae4a34cd62b0565bb1306a1a7?d=identicon)[ggergo](/maintainers/ggergo)

---

Top Contributors

[![ggergo](https://avatars.githubusercontent.com/u/12773054?v=4)](https://github.com/ggergo "ggergo (14 commits)")[![albertboada](https://avatars.githubusercontent.com/u/1840284?v=4)](https://github.com/albertboada "albertboada (1 commits)")[![BenMorel](https://avatars.githubusercontent.com/u/1952838?v=4)](https://github.com/BenMorel "BenMorel (1 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (1 commits)")[![ljmaskey](https://avatars.githubusercontent.com/u/1082557?v=4)](https://github.com/ljmaskey "ljmaskey (1 commits)")

---

Tags

mysqldoctrinedqlquerybuilderindexforceuseforceindexuseindexcreateQueryBuildercreateQuery

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ggergo-sqlindexhintbundle/health.svg)

```
[![Health](https://phpackages.com/badges/ggergo-sqlindexhintbundle/health.svg)](https://phpackages.com/packages/ggergo-sqlindexhintbundle)
```

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[oro/doctrine-extensions

Doctrine Extensions for MySQL and PostgreSQL.

34411.8M19](/packages/oro-doctrine-extensions)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4636.8M12](/packages/fresh-doctrine-enum-bundle)[luxifer/doctrine-functions

Doctrine DQL Functions for Mysql

882.5M](/packages/luxifer-doctrine-functions)[mapado/mysql-doctrine-functions

MySQL Function for Doctrine : RAND(), ROUND() DATE(), DATE\_FORMAT()...

44271.5k1](/packages/mapado-mysql-doctrine-functions)[fza/mysql-doctrine-levenshtein-function

Provides the `LEVENSHTEIN()` and `LEVENSHTEIN\_RATIO()` MySQL functions for Doctrine2.

47115.8k1](/packages/fza-mysql-doctrine-levenshtein-function)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
