Re: lightweight database
- From: "vanekl" <vanek@xxxxxxx>
- Date: Thu, 18 Mar 2010 12:41:57 -0400
Raymond Wiker wrote:
"vanekl" <vanek@xxxxxxx> writes:
Yikes. You're way off. The worst-case scenario is O(m.n),
where:
m is the number of records in the database, and
n is the number of joins.
I'm sure that if I gave this some thought I could do better.
O(m^n), surely?
God no, not if ^ represents the exponential operator. Why did you add an
exponent? To be clear, I guess I should have explicitly added a multiply
sign: O(m*n).
Good luck getting that to scale linearly.
The analysis is linear, not exponential, not even polynomial. I also gave an
upper bound based on a minute and a half of thinking. Surely somebody can do
better when they sit down and apply themselves for more than that.
map/reduce works because you don't have joins... the "table" is
effectively a completely de-normalized view of your data.
I take issue with your presumption that the data must be completely
denormalized. It doesn't. Joins can be simulated if the full denormalized
record is not incorporated within one atomic record. That's why I said that
the analysis required (an upper bound of) O(m*_n_) time, because a
brute-force algorithm would have to search the entire db for each join. If
the db was completely denormalized, as you suggest, the time analysis
reduces to O(m).
Also (and this should have been mentioned earlier): quoting
Moore's law is fine as long as you are talking about sequential
processing. When you switch to parallel processing, you should also
consider Amdahl's law.
The debate on that would take me on a tangent I'm not willing to spend time
on at the moment. It's an interesting point you raise, but, like I said, a
tangent, especially considering you dispute the main points of my position.
.
- Follow-Ups:
- Re: lightweight database
- From: Raymond Wiker
- Re: lightweight database
- References:
- lightweight database
- From: Tamas K Papp
- Re: lightweight database
- From: Raffael Cavallaro
- Re: lightweight database
- From: Alex Mizrahi
- Re: lightweight database
- From: Raffael Cavallaro
- Re: lightweight database
- From: Alex Mizrahi
- Re: lightweight database
- From: vanekl
- Re: lightweight database
- From: Thomas A. Russ
- Re: lightweight database
- From: vanekl
- Re: lightweight database
- From: Alex Mizrahi
- Re: lightweight database
- From: vanekl
- Re: lightweight database
- From: Andrew Poelstra
- Re: lightweight database
- From: vanekl
- Re: lightweight database
- From: Andrew Poelstra
- Re: lightweight database
- From: vanekl
- Re: lightweight database
- From: Raymond Wiker
- lightweight database
- Prev by Date: Re: lightweight database
- Next by Date: Re: capturing the current package
- Previous by thread: Re: lightweight database
- Next by thread: Re: lightweight database
- Index(es):
Relevant Pages
|