3 ms·
I worry that having things "all handled by the system" can be even more of a performance footgun. I mean that users will be able to do things that are allowed
by adrianratnapala 9y ago
I worry that having things "all handled by the system" can be even more of a performance footgun. I mean that users will be able to do things that are allowed by the docs, but which result in, expensive and hard-to-see things are happening under the hood.
- flukus 9y agoThis is a valid concern, I've seen simple automatic optimizations backfire before. An example I remember from MS Sql Server (older versions) of a very simple optimization of using indexes can backfire with the dynamic filter pattern: where ((@foo is null) or (foo = @foo)) and ((@bar is null) or (bar = @bar)) Depending on statistics, order of execution, indexes in place and phase of the moon this could produce fast results or have to revert to a full table scan (because it uses a cached query plan with the wrong index). Devs still have some awareness of how queries translate to actual running instructions and to measure that the results are in line with what is expected.
- mst 9y agoModern pg libraries only cache the plan with the query params involved as well so this generally doesn't happen. (I made it happen with an older version of things and ... yes, argh)
- mst 9y agoThis is a completely reasonable worry though I must note that postgres has done it way more rarely than anything else I've dealt with which may explain the voting response to this comment.