logoalt Hacker News

stephenyesterday at 10:55 PM0 repliesview on HN

> trace optimizer/better sql in the next run

Ah wow! I admittedly already linked this PR in another reply, but I'm trying similar things here:

https://github.com/joist-orm/joist-orm/pull/1967

Neat to hear you had success with it before; did you have to handle "the optimization was inaccurate [a novel codepath asked for a column we didn't return], so fallback to `select *`"? And do that without failing the overall request?

This "fallback and implicit retry" is what I'm doing atm, and just assuming is the only way of handling the "novel codepath was hit this time" problem, but lmk if I'm missing something.