doctrine / dbal

Doctrine Database Abstraction Layer
https://www.doctrine-project.org/projects/dbal.html
MIT License
9.4k stars 1.33k forks source link

Add querybuilder from table hints #6415

Closed ebuildy closed 3 weeks ago

ebuildy commented 1 month ago
Q A
Type feature
Fixed issues

Summary

Working on Prestashop, I need to force some column index in order to improve mysql query time. FORCE INDEX did the trick, but this is impossible to configure.

This PR add the possibility to define content before and after table definition. I am aware this is only for mysql currently:

greg0ire commented 1 month ago

Since this is highly vendor-specific, I don't think it belongs to an abstraction layer.

ebuildy commented 1 month ago

Yes I agree, should I create a MySQLQueryBuilder ?

Le lun. 3 juin 2024, 04:15, Grégoire Paris @.***> a écrit :

Since this is highly vendor-specific, I don't think it belongs to an abstraction layer.

— Reply to this email directly, view it on GitHub https://github.com/doctrine/dbal/pull/6415#issuecomment-2144559710, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJJZ2O2WVD5OC4D57REFMDZFQQ3VAVCNFSM6AAAAABISXV3USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBUGU2TSNZRGA . You are receiving this because you authored the thread.Message ID: @.***>

greg0ire commented 3 weeks ago

The dbal is supposed to be an abstraction layer, so I'd say this shouldn't be contributed at all.

ebuildy commented 3 weeks ago

The dbal is supposed to be an abstraction layer, so I'd say this shouldn't be contributed at all.

Thanks I see. Alternative is https://github.com/shipmonk-rnd/doctrine-mysql-optimizer-hints