Re: Concurrent table access from InnoDB

Hiromichi Watari <[email protected]>
Newsgroups gmane.comp.db.mysql.devel
Message-ID <[email protected]>
Hi Shawn and Rick,
Thank you for your response.
My question was whether a client thread can access more than one table at a time in the course of join execution (parallel access of multiple tables) to speed up the query if an extra slave thread is available.
I do not know if there is anything in InnoDB (or storage engine in general) which serializes access to tables preventing parallel access.

Hiromichi


________________________________
From: Shawn Green (MySQL) <[email protected]>
To: Rick James <[email protected]> 
Cc: [email protected] 
Sent: Friday, November 18, 2011 5:16 PM
Subject: Re: Concurrent table access from InnoDB

On 11/18/2011 16:29, Rick James wrote:
> Is this what keeps there from being parallelism in PARTITIONed tables?
> 
> ...

No. Those partitions are accessed internally. Multiple threads can be spawned in the context of resolving a single query. Any lack of parallelism in resolving PARTITIONed table queries is simply a matter of design time and effort.

Now, in the context of accessing internal resources any query that requires a JOIN will need to touch at least two tables under the same user context.  Perhaps I misunderstood the original question?

> 
> Hi,
> Is it possible for a client connection thread to access 2 tables concurrently from InnoDB, say using a slave thread ?  Or is access limited to one table at a time per client connection thread ?

Perhaps he was asking about the optimizer processing a command that needed to touch two or more tables?  If that's the purpose of the question then of course more than one table can be accessed in the context of a single connection. This happens very frequently.  I cannot say with absolute certainty if those tables are processed in parallel but I would be concerned if they were not.

I was reading his question more like this: Can the same connection be used to open multiple queries where each query is pointing to a separate table? In that context, each connection can only have one active command.

-- Shawn Green
MySQL Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

-- MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/[email protected]

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.