>>>>> "Sinisa" == Sinisa Milivojevic <sinisa@stripped> writes:
Sinisa> On Mon, 5 Nov 2001 23:48:27 -0600 (CST)
Sinisa> Feng Tian <ftian@stripped> wrote:
>> I want to use MySQL in my research work. My work needs to
>> modify the database engine. So here I got some questions,
>> 1. Is there a system design document, or architecutre overview
>> for help new developers to understand MySQL internals?
>> 2. The one-sweep multi join, is this a left deep (index) nested loop
>> join? Are other join algorithms, like sort-merge, used in
Sinisa> Short answerd to your questions.
Sinisa> 1. No, there is no overall document. There are some documents, like on MyISAM,
> client - server protocol etc
Sinisa> 2. Yes, sort-merge is used in MySQL ..
Sorry, but sort merge is not used;
Currently we do a buffered all-to-all comparison in the case where
there is no keys available. This means that MySQL will not perform as
some other databases if you don't have proper keys in place.
The one-sweep join is exectued in:
do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records)
is the most common loop.
If you take a look at these functions, then you will get a picture of
how things are done.