[Rt-commit] [rtir] 03/03: There's no need to sort the subselect

Kevin Falcone falcone at bestpractical.com
Fri Nov 22 19:38:08 EST 2013


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 3.0/2.9.0-upgrade-performance
in repository rtir.

commit 63045f1686e3cbc54e8889eb9f5c54f372f7dde6
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Nov 22 16:22:49 2013 -0500

    There's no need to sort the subselect
    
    All this does is force mysql to sort (possibly filesort) and we really
    don't care about the order when we're going to use it to feed an update
    or delete.
---
 etc/upgrade/2.9.0/content | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/etc/upgrade/2.9.0/content b/etc/upgrade/2.9.0/content
index 6f8d906..3f51584 100644
--- a/etc/upgrade/2.9.0/content
+++ b/etc/upgrade/2.9.0/content
@@ -204,6 +204,7 @@ our @Final = (
                 $txns->Limit( ALIAS => $ocfv_alias, FIELD => 'Content', VALUE => $state );
                 $txns->Limit( ALIAS => $ocfv_alias, FIELD => 'CustomField', VALUE => $cf->id );
                 $txns->Columns('id');
+                $txns->OrderBy;
 
                 my $res = $RT::Handle->SimpleUpdateFromSelect(
                     'Transactions', { $old_new .'Value' => $state }, $txns->BuildSelectQuery
@@ -231,6 +232,7 @@ our @Final = (
                     VALUE    => 'NULL'
                 );
                 $txns->Columns( $old_new .'Reference' );
+                $txns->OrderBy;
 
                 my $res = $RT::Handle->DeleteFromSelect(
                     'ObjectCustomFieldValues', $txns->BuildSelectQuery
@@ -269,6 +271,7 @@ our @Final = (
             $txns->Limit( FIELD => 'Type', VALUE => 'CustomField' );
             $txns->Limit( FIELD => 'Field', VALUE => $cf->id );
             $txns->Columns('id');
+            $txns->OrderBy();
 
             my $res = $RT::Handle->SimpleUpdateFromSelect(
                 'Transactions',

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list