Content pfp
Content
@
0 reply
0 recast
2 reactions

Varun Srinivasan pfp
Varun Srinivasan
@v
Why doesn’t Postgres let you specify hints to the query planner?
0 reply
3 recasts
33 reactions

✳️ nibnalin on daimo pfp
✳️ nibnalin on daimo
@nibnalin.eth
Materialized views seem to work great for me for giving hints: create successive views that narrow down in a way that uses your best index / query path.
1 reply
0 recast
1 reaction

✳️ nibnalin on daimo pfp
✳️ nibnalin on daimo
@nibnalin.eth
Example in screenshot -- filters by the faster index / plan first and materializes it, then adds the slower filters on top. Postgres optimizer doesn't understand this ordering, any query I tried reverses the order of application making it over 40x slower.
0 reply
0 recast
1 reaction