cheekybuddha
How do I specify a MySQL index hint?
Hi, I am trying to build the following query (as a CTE, as part of a larger query), but I can not work out how I can pass the index hint (
USE INDEX ...
):
I tried using raw sql:
but I get typescript error:
I can get it to work if I build the whole complete query with sql`...`
, but that brings about other issues such as how to use .stream()
instead of sql`...`.execute(db)
Any clues?5 replies