3 ms·
Reading further I see the article goes into dynamic tables/views, and how it's normally a code smell. I agree it's not something you should do lightly, and you
by magicalhippo 4y ago
Reading further I see the article goes into dynamic tables/views, and how it's normally a code smell. I agree it's not something you should do lightly, and you need to consider the cost vs the benefits.
I mean clearly we could just maintain multiple near-identical static queries and just pick the right one, rather than have a single dynamic query.
However, then you're stuck having to keep them in sync and you will eventually screw that up.
In our case, we'll resort to that if the alternatives are too painful, which so far has just been a few places amongst our several hundred queries.