diff options
author | ivan <ivan> | 2005-12-25 03:00:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2005-12-25 03:00:33 +0000 |
commit | 58c036fab9ec7f116c5c3f60f20116b433b1930a (patch) | |
tree | 15420db211f02a3142ab9bff4946fb7a945b2cef | |
parent | 75e7d0189cb306f8ea01c4961f1e3cd02cd92675 (diff) |
update indices for better tax report performance
-rw-r--r-- | FS/FS/Schema.pm | 6 | ||||
-rw-r--r-- | README.1.5.8 | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index aaca5ef3b..7fc208f18 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -334,7 +334,7 @@ sub tables_hashref { ], 'primary_key' => 'billpkgnum', 'unique' => [], - 'index' => [ ['invnum'] ], + 'index' => [ ['invnum'], [ 'pkgnum' ] ], }, 'cust_bill_pkg_detail' => { @@ -433,6 +433,8 @@ sub tables_hashref { #'index' => [ ['last'], ['company'] ], 'index' => [ ['last'], [ 'company' ], [ 'referral_custnum' ], [ 'daytime' ], [ 'night' ], [ 'fax' ], [ 'refnum' ], + [ 'ship_last' ], [ 'ship_company' ], + [ 'county' ], [ 'state' ], [ 'country' ] ], }, @@ -465,7 +467,7 @@ sub tables_hashref { 'primary_key' => 'taxnum', 'unique' => [], # 'unique' => [ ['taxnum'], ['state', 'county'] ], - 'index' => [], + 'index' => [ [ 'county' ], [ 'state' ], [ 'country' ] ], }, 'cust_pay' => { diff --git a/README.1.5.8 b/README.1.5.8 index 73a85a237..cf414545e 100644 --- a/README.1.5.8 +++ b/README.1.5.8 @@ -17,6 +17,14 @@ run "freeside-upgrade username" to uprade your database schema Optional: CREATE INDEX cust_pkg2 ON cust_pkg ( pkgpart ); +CREATE INDEX cust_bill_pkg2 ON cust_bill_pkg ( pkgnum ); +CREATE INDEX cust_main9 ON cust_main ( county ); +CREATE INDEX cust_main10 ON cust_main ( state ); +CREATE INDEX cust_main11 ON cust_main ( country ); +CREATE INDEX cust_main_county1 ON cust_main_county ( county ); +CREATE INDEX cust_main_county2 ON cust_main_county ( state ); +CREATE INDEX cust_main_county3 ON cust_main_county ( country ); + Optional for better VoIP performance: CREATE INDEX rate_detail2 ON rate_detail ( ratenum, dest_regionnum ); |