Bug #57848 Ndb : Table reorg scan should probably use TUP order
Submitted: 29 Oct 2010 15:29 Modified: 5 Nov 2010 21:17
Reporter: Frazer Clement Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Frazer Clement CPU Architecture:Any

[29 Oct 2010 15:29] Frazer Clement
Description:
As part of online table reorg the table is scanned and relevant tuples are moved to new fragment(s).

Where the table has data on disk, scanning using ACC will give random-style access to disk.

Scanning in 'TUP order' should give a better approximation of sequential disk IO.

Suggest modifying table reorg scans to scan in TUP order.

How to repeat:
Create a large table with data on disk.

Alter the table to add partitions

Observe the DD access pattern of the scans.

Suggested fix:
Modify TRIX to request TUP order scan in Reorg COPY/DELETE data scenarios
[29 Oct 2010 15:42] Frazer Clement
Proposed patch

Attachment: bug57848.patch (text/x-patch), 1.67 KiB.

[29 Oct 2010 17:43] Frazer Clement
Second proposal.  Dict determines TUP Order iff there are disk columns

Attachment: bug57848-2.patch (text/x-patch), 4.57 KiB.

[1 Nov 2010 15:11] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:frazer@mysql.com-20101101144853-ok4iws7cp1n4ydsm) (version source revid:frazer@mysql.com-20101101144853-ok4iws7cp1n4ydsm) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[1 Nov 2010 15:42] Frazer Clement
Also pushed to 7.1.9
[1 Nov 2010 17:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/122465

3910 Frazer Clement	2010-11-01
      Bug#57848 Ndb : Table reorg scan should probably use TUP order
      
      Modify table reorg code to use TUP order scan when table contains disk columns.
      
      This should tend towards a more sequential access pattern to data on disk.
[5 Nov 2010 21:17] Jon Stephens
Documented fix in the NDB-7.0.20 and 7.1.9 changelogs, as follows:

        When performing online DDL on Disk Data tables, scans and moving
        of the relevant tuples were done in more or less random order.
        This fix causes these scans to be done in the order of the
        tuples, which should improve performance of such operations due
        to the more sequential ordering of the scans.

Closed.