4 ms·
One pertinent example of this: Tom Kyte (Oracle guru) argues against treating Oracle as a black box. If you try to ignore Oracle's internals, you'll tend to end
by msluyter 17y ago
One pertinent example of this: Tom Kyte (Oracle guru) argues against treating Oracle as a black box. If you try to ignore Oracle's internals, you'll tend to end up doing things in extremely suboptimal ways. Say, for example, by not using bind variables in your queries. The more I use Oracle the more I agree with Tom Kyte.
- ntoshev 17y agoOracle should keep statistics on the queries it gets and infer which of the parameters should be treated as bound parameters in a reusable query plan. I wonder why it doesn't. It would still need to parse queries, but I believe making the query plan is the expensive part. Also parsing could be done by the client machine's driver.
- msluyter 17y agoSo, you're saying given queries like: select * from t where t.col = 'foo' select * from t where t.col = 'bar' select * from t where t.col = 'baz' Oracle should infer that foo|bar|baz should be parameterized? Interesting idea, though this seems like matter of matching parse trees, and I believe that's a relatively expensive operation, roughly polynomial time, iirc.
- ntoshev 17y agoYou don't have to infer all semantically equivalent queries, comparing queries as linear streams of tokens should do.