X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_phone.pm;h=c2250c111f38bbfa72b39581b7f234592a531821;hb=2cdb0b3f9e3b778fd914d847fc7851948a9930e4;hp=725092edb0ee87955cfa7e7d8473fb00211e1f09;hpb=0e17979577dacf0277de470ca7ee724f68a56cd5;p=freeside.git diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 725092edb..c2250c111 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;