in reply to Re^5: Dynamic SQL
in thread Dynamic SQL

If each prepared statement is used only once then, no, it won't be true.

for instance.

And then there is the fickleness of planning.

But I can see it would be hard to set up a broad, convincing case.

Replies are listed 'Best First'.
Re^7: Dynamic SQL
by Laurent_R (Canon) on Apr 06, 2015 at 17:47 UTC
    This is generally the case with any caching or memoizing strategy: if the cached results are never re-used, then caching is an overhead. But still, there are many many cases where caching really make sense, it can sometimes transform a quadratic (and sometimes even exponential) algorithm into a linear one. Sometimes it is easy enough to analyze to figure out; in other cases, only benchmark can tell.

    Je suis Charlie.