bitemyapp / bitemyapp/esqueleto
Allow index hinting
Open
enhancement
needs discussion
- Dominant language
- Haskell
- Stars
- 399
- Forks
- 107
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 1
Description
We've run into a production performance problem where MySQL is too dumb to pick up on using an index that increases perf by 100x.
The bad query is morally:
```sql
SELECT *
FROM foo
INNER JOIN bar
INNER JOIN baz
WHERE bar.x BETWEEN a AND b
```
Where `bar.x` is indexed. The fix is:
```sql
SELECT *
FROM foo
INNER JOIN bar USE INDEX (`x`)
INNER JOIN baz
WHERE bar.x BETWEEN a AND b
```
Since Esqueleto can't do this, the entire query needs to be rewritten in raw SQL.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.