Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: write sets and read sets

From: Ingo Strüwing <ingo(at)mysql.com>
Date: Tue Jul 10 2007 - 12:15:45 EDT


Hi Alex,

Alex Pilchin wrote:
...
> The definition I was using
> ReadSet - set of rows/columns accessed by the read
> WriteSet - set of rows/columns modified on an update/insert and potentially the new values to be written (in some format)

Aha. This does not match the read_set/write_set of the handler interface.

I agree with Jim that this looks more like what we have in the binary log as "before image" and "after image".

...
> You talk about columns, but is there also information contained about
> which rows need to be read from or written to.

No. Definitely not in read_set/write_set.

...
> The key question for me is "Is it is possible to retrieve in some format
> the row/column set that the DB is modifying?".
> If so, then I would like to know "Is it possible to pass this
> information in directly to an exact copy of the DB, bypassing all of the
> parsing, analysis, write_set creation, etc that have already been done
> the first time (and are redundant the 2nd time) and have the DB just
> apply it?"

You might be able to retrieve such information from the binary log, if you use row-based logging. Otherwise I don't believe so. A set of "records to be retrieved/modified" is not stored anywhere in the server, AFAIK. And, IMHO, it cannot be done. There is no "record identifier" that is common to all storage engines. Some use the primary key, others use a record number, others use the file position of the record start.

Do you need help?X

When the server needs a "set of rows/columns" internally, it creates a temporary table and fills it with the (partial) records. But this is not done for every update. If this is done for some updates at all, the table won't necessarily contain the columns to be written to. This happens only if the write column is also used for selecting the record.

Regards
Ingo

-- 
Ingo Strüwing, Senior Software Developer
MySQL GmbH, Radlkoferstr. 2, D-81373 München
Geschäftsführer: Kaj Arnö - HRB München 162140

-- 
MySQL Internals Mailing List
For list archives: 
http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Tue Jul 10 12:15:53 2007

This archive was generated by hypermail 2.1.8 : Mon Jul 16 2007 - 05:12:18 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library