Jonathan,
Any savings you predict are only guesses. I don't think we can predict the performance benefits of cutting down the *number* of separate queries.
If you think otherwise, what is your basis?
Ed Poor Software Estimation expert
On Tue, Dec 10, 2002 at 09:15:14AM -0500, Poor, Edmund W wrote:
Any savings you predict are only guesses. I don't think we can predict the performance benefits of cutting down the *number* of separate queries.
If you think otherwise, what is your basis?
Prepared queries. A few complex queries can be optimized ahead of time as prepared queries so you can execute them time after time without any parsing and optimization overhead in the database itself. The fewer queries there are, the less time spent communicating to the database (which isn't fast) and the less time on the client side doing parsing that the database server itself has been optimized for.
I am predicting a big savings. I cannot at this point predict how much of a savings; we are still in design stage, and input on how to set up the database schema for maximum optimizability is welcome.
Jonathan
On Tue, Dec 10, 2002 at 09:15:14AM -0500, Poor, Edmund W wrote:
Any savings you predict are only guesses. I don't think we can predict the performance benefits of cutting down the *number* of separate queries.
If you think otherwise, what is your basis?
My basis is that each query requires a separate parsing, planning, optimization, and execution stage. Although execution may happen fast, cutting the other stages out of the loop can provide dramatic speed improvements. Amortized over thousands of queries, the effect is really dramatic.
My basis is years of experience applying Chuck Moores FORTH philosophy to factor, refine, and do ONLY what is necessary, and no more.
There is a certain required amount of complexity for this project. But we should not let it expand beyond that. Complexity begets complexity in an unholy upward spiral.
In this design stage we are finding out what is needed. Later on we can work on simplifying, etc.
For inspirational reading, here is an essential essay from Mr. Moores protege, Jeff Fox:
http://ultratechnology.com/forth.htm
Jonathan
wikitech-l@lists.wikimedia.org