X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_phone.pm;h=ccc28a0dfc586a837f3fbca5375f9a9f30212dbf;hb=f9080ff94784f66cca0e94458a98d87af262474d;hp=0c42832ff9ce14a27717e84060fb6b3873d1f67c;hpb=eef47827c287da562ef36ccbb120e64bee798879;p=freeside.git diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 0c42832ff..ccc28a0df 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -852,8 +852,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;