Re: [GENERAL] 回复:[GENERAL] SP to calc shipments vs receipts

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: DDT <410845160(at)qq(dot)com>
Cc: bret_stern <bret_stern(at)machinemanagement(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] 回复:[GENERAL] SP to calc shipments vs receipts
Date: 2013-09-25 14:46:40
Message-ID: CAKt_ZftFFupNccgEVhfEL+j8_ACwpFfCQJRcKfm242KDw2N=qA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 25, 2013 at 7:27 AM, DDT <410845160(at)qq(dot)com> wrote:

> By the way, you can try to save the current totals to another table.
> update it through triggers when the inventory transactions changed.
> it may lead to better performance on a large set of inventory transactions
> for query current totals
>

If you are going to do this, my recommendation is to store periodic
summaries (i.e. for sum through date) and then aggregate rolling forward.
This vastly simplifies querying and data validation if you are only
appending data.
--
Best Wishes,
Chris Travers

Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor
lock-in.
http://www.efficito.com/learn_more.shtml

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bret Stern 2013-09-25 14:55:52 Re: 回复:[GENERAL] SP to calc shipments vs receipts
Previous Message DDT 2013-09-25 14:27:58 回复:[GENERAL] SP to calc shipments vs receipts