3 ms·
> To write efficient big queries, you need to think in terms of data flow and write declarative SQL with an execution plan in mind; it reminds me of my days twe
by keanzu 7y ago
> To write efficient big queries, you need to think in terms of data flow and write declarative SQL with an execution plan in mind; it reminds me of my days tweaking source code to encourage a compiler to make certain register allocation decisions.
That mirrors my experience with Oracle. The only difference is that there's a hinting mechanism provided which will almost always allow you to force the execution plan you want.
- iimblack 7y agoUgh hints. The things they almost always recommend you don’t use because the optimizer should know better. Unsarcastically, this is usually true. More often I see people who think they’re being clever killing performance with undocumented hints instead of either letting the engine do its work or looking for other ways to optimize.