[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5082] branches/1.3



Revision: 5082
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5082&view=rev
Author:   einhverfr
Date:     2012-08-02 10:57:08 +0000 (Thu, 02 Aug 2012)
Log Message:
-----------
Performance fix for all_years

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/sql/Pg-database.sql
    branches/1.3/sql/modules/Fixes.sql

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2012-08-02 09:54:34 UTC (rev 5081)
+++ branches/1.3/Changelog	2012-08-02 10:57:08 UTC (rev 5082)
@@ -6,7 +6,10 @@
 * Fixed error when trying to save multiple make/models for a part (Chris T)
 * Better error handling when date is entered into statement balance (Chris T)
 * Added pricegroup selection back to entity credit account (Chris T, 3550056)
+* Fix for slow performance with Form->all_years (Chris T, h/t Neil S)
 
+Niel S is Neil Smith
+
 Changelog for 1.3.21
 * Added a default numberformat in Form.pm (Chris T)
 * Added a container div for theming saved and/or posted docs (Chris T)

Modified: branches/1.3/sql/Pg-database.sql
===================================================================
--- branches/1.3/sql/Pg-database.sql	2012-08-02 09:54:34 UTC (rev 5081)
+++ branches/1.3/sql/Pg-database.sql	2012-08-02 10:57:08 UTC (rev 5082)
@@ -4716,5 +4716,9 @@
 
  This reasoning is hacky and i hope it can dissapear when we get to 1.4 - D.M.
 $$;
+
+-- helpful to keeping the selection of all years fast
+create index ac_transdate_year_idx on acc_trans(EXTRACT ('YEAR' FROM transdate));
+
  
 commit;

Modified: branches/1.3/sql/modules/Fixes.sql
===================================================================
--- branches/1.3/sql/modules/Fixes.sql	2012-08-02 09:54:34 UTC (rev 5081)
+++ branches/1.3/sql/modules/Fixes.sql	2012-08-02 10:57:08 UTC (rev 5082)
@@ -467,3 +467,10 @@
 ALTER TABLE makemodel DROP CONSTRAINT makemodel_pkey;
 ALTER TABLE makemodel ADD PRIMARY KEY(parts_id, make, model);
 COMMIT;
+
+BEGIN;
+-- performance fix for all years list  functions
+
+create index ac_transdate_year_idx on acc_trans(EXTRACT ('YEAR' FROM transdate));
+
+COMMIT;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.