Get a Quote Right Now

Edit Template

Use custom index

You can provide a certain index for database server to use in some cases. This feature is only supported in MySQL.

const users = await dataSource
    .getRepository(User)
    .createQueryBuilder("user")
    .useIndex("my_index") // name of index
    .getMany()

Share

Leave a Reply

Your email address will not be published. Required fields are marked *