CGM shrink

Dear RT hackers,

Does someone know (ruz?) which change in RT make entries that are
removed by shrink_cgm_table.pl script no longer be written to db in
3.8.x ?

(I would like to backport this on 3.6 if possible)

svk snn lib/RT/CachedGroupMember_Overlay.pm, I think it’s one line
change in method Create. Ping me if you wouldn’t find it.On Wed, Feb 11, 2009 at 12:23 PM, Emmanuel Lacour elacour@easter-eggs.com wrote:

Dear RT hackers,

Does someone know (ruz?) which change in RT make entries that are
removed by shrink_cgm_table.pl script no longer be written to db in
3.8.x ?

(I would like to backport this on 3.6 if possible)


List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Best regards, Ruslan.

svk snn lib/RT/CachedGroupMember_Overlay.pm, I think it’s one line
change in method Create. Ping me if you wouldn’t find it.

Thanks Ruz :), seems to be this change:

@@ -148,6 +149,8 @@
}
}

  • return $id if $args{‘Member’}->id == $args{‘Group’}->id;
    if ( $args{‘Member’}->IsGroup() ) {
    my $GroupMembers = $args{‘Member’}->Object->MembersObj();
    while ( my $member = $GroupMembers->Next() ) {

That will have some impact here as the cgm table contains 1232959 rows and the
shrink script removes 390419 rows :slight_smile:

don’t forget to analyze table after that.On Fri, Feb 13, 2009 at 6:51 PM, Emmanuel Lacour elacour@easter-eggs.com wrote:

On Wed, Feb 11, 2009 at 04:51:19PM +0300, Ruslan Zakirov wrote:

svk snn lib/RT/CachedGroupMember_Overlay.pm, I think it’s one line
change in method Create. Ping me if you wouldn’t find it.

Thanks Ruz :), seems to be this change:

@@ -148,6 +149,8 @@
}
}

  • return $id if $args{‘Member’}->id == $args{‘Group’}->id;
  • if ( $args{‘Member’}->IsGroup() ) {
    my $GroupMembers = $args{‘Member’}->Object->MembersObj();
    while ( my $member = $GroupMembers->Next() ) {

That will have some impact here as the cgm table contains 1232959 rows and the
shrink script removes 390419 rows :slight_smile:

Best regards, Ruslan.

don’t forget to analyze table after that.

Of course :slight_smile:

But on this RT, shrink of cgms has near to no effect on performances :frowning:

ACL check should be a little bit faster and some other queries but I
don’t think improvement is more than 3%. However, 1 percent here and
there and quickly it’s ten and more :)On Fri, Feb 13, 2009 at 11:46 PM, Emmanuel Lacour elacour@easter-eggs.com wrote:

On Fri, Feb 13, 2009 at 08:33:55PM +0300, Ruslan Zakirov wrote:

don’t forget to analyze table after that.

Of course :slight_smile:

But on this RT, shrink of cgms has near to no effect on performances :frowning:

Best regards, Ruslan.

ACL check should be a little bit faster and some other queries but I
don’t think improvement is more than 3%. However, 1 percent here and
there and quickly it’s ten and more :slight_smile:

Yes, but I looked at cleanup of CGMs because I was facing slowness issue
on “take” action and … that’s exactly the bug already discussed here:
http://rt3.fsck.com/Ticket/Display.html?id=12554 :frowning:

Here the same query take between about 5 seconds, doing a full index
scan on CGMs, for an empty result :frowning:

Seems far faster on Oracle 10 than 9 …