From: Michael Widenius Date: January 25 2001 3:33pm Subject: Re: parallel Mysql ? List-Archive: http://lists.mysql.com/internals/384 Message-Id: <14960.18265.675160.356204@narttu.mysql.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! >>>>> "Mauricio" == Mauricio Breternitz writes: Mauricio> As Sasha said, intra-query parallelization is a VERY HARD TASK. Mauricio> However, even an SMP could take a throughput approach and run Mauricio> several copies of the MySQL server (would get some parallelism Mauricio> in the query optimization, etc, stages) before hitting the file system. Mauricio> Each processor would execute one query completely. Inter-processor Mauricio> locks are needed to protect the next query from trying to hit Mauricio> the table before the previous query is finished in another processor Mauricio> I'm not on an SMP, however the processors share access to the disks. Mauricio> The throughput approach is still feasible. Mauricio> Any suggestions at which files should I look into as reasonable place to put Mauricio> inter-processor locks ? Mauricio> (I'm currently delving in the sql/*.cc files and looking at things Mauricio> like open_and_lock_tables ), If you are just searching after locks, then the place to do this is mysys/thr_lock.c When a thread asks for access to a table, it always calls thr_lock() to get the lock and will execute thr_unlock() when it's ready. This is even true for BDB tables, but in this case thr_lock() allows multiple read and write locks at the same time. Regards, Monty