[freeside-commits] branch master updated. 8e31152753c243cbd3e67b36fb63e1e288963c61

Ivan ivan at 420.am
Tue Apr 25 13:37:08 PDT 2017


The branch, master has been updated
       via  8e31152753c243cbd3e67b36fb63e1e288963c61 (commit)
      from  9314b55f352d9ba389cd5c09d9eed2f0d2e9c83b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8e31152753c243cbd3e67b36fb63e1e288963c61
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Apr 25 13:37:07 2017 -0700

    fix occasional bad query planning searching for CDRs, RT#74494

diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm
index 725092e..c2250c1 100644
--- a/FS/FS/svc_phone.pm
+++ b/FS/FS/svc_phone.pm
@@ -864,8 +864,15 @@ the entire result set.
 =cut
 
 sub psearch_cdrs {
-
   my($self, %options) = @_;
+
+  unless ( $options{'billsec_sum'} ) {
+    #fixes a weird sequential scan of the whole cdr table on startdate, but only
+    # for a few charged_party values here and there.
+    # Pg 9.1 only?  need to retest on 9.4, 9.6
+    dbh->do('SET enable_indexscan TO OFF');
+  }
+
   my @fields;
   my %hash;
   my @where;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/svc_phone.pm |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list