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)15534.2k↓25.6%8[1 PRs](https://github.com/ggergo/SqlIndexHintBundle/pulls)MITPHPPHP ^7.1 || ^8.0CI failing

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 2d 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 90% of packages

Maintenance30

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

1607d 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.

58825.9M54](/packages/scienta-doctrine-json-functions)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[oro/doctrine-extensions

Doctrine Extensions for MySQL and PostgreSQL.

34412.3M24](/packages/oro-doctrine-extensions)[api-platform/doctrine-orm

Doctrine ORM bridge

294.4M92](/packages/api-platform-doctrine-orm)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.8k](/packages/ahmed-bhs-doctrine-doctor)[sarfraznawaz2005/indexer

Laravel package to monitor SELECT queries and offer best possible INDEX fields.

562.7k](/packages/sarfraznawaz2005-indexer)

PHPackages © 2026

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