List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:November 7 2001 2:46am
Subject:Re: MySQL design doc, and some question.
View as plain text  
Hi!

>>>>> "Sinisa" == Sinisa Milivojevic <sinisa@stripped> writes:

Sinisa> On Mon, 5 Nov 2001 23:48:27 -0600 (CST)
Sinisa> Feng Tian <ftian@stripped> wrote:

>> Hi,
>> 
>> 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
>> MySQL?
>> 
>> Thanks.  
>> 
>> Feng
>> 
>> 

Sinisa> Hi!

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:

sql_select.cc

static int
do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)

where

static int
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.

Regards,
Monty
Thread
bk commit into 4.0 treearjen6 Nov
  • MySQL design doc, and some question.Feng Tian6 Nov
    • Re: MySQL design doc, and some question.Sinisa Milivojevic6 Nov
      • Re: MySQL design doc, and some question.Feng Tian6 Nov
        • Re: MySQL design doc, and some question.Michael Widenius7 Nov
      • Re: MySQL design doc, and some question.Michael Widenius7 Nov