Subquery on same table
I'm experimenting with how to improve the performance of some queries against a PlanetScale MySQL DB.
I have a fulltext index on a field in a table, then some other indexes on various other fields.
MySQL can't use two indexes for a query so I'd like to try including the section of the query that uses the fulltext column in a subquery but I'm struggling with the syntax
The primary key of the table is activityId.
Something like
but I'm struggling with the Kysely syntax to achieve this, can anyone please point me in the right description?
3 Replies