Re: need to speed up query

From: Justin <justin(at)emproshunts(dot)com>
To: Shaun Thomas <sthomas(at)leapfrogonline(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: need to speed up query
Date: 2008-05-06 17:22:11
Message-ID: 482093C3.1050604@emproshunts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

it worked it had couple missing parts but it worked and ran in 3.3
seconds. *Thanks for this *
i need to review the result and balance it to my results as the
Accountant already went through and balanced some accounts by hand to
verify my results

<<begin quote>>

You might want to consider a
denormalized summary table that contains this information (and maybe
more) maintained by a trigger or regularly invoked stored-procedure and
then you can select from *that* with much less agony.

<<end quote>>

I just dumped the summary table because it kept getting out of balance
all the time and was missing accounts that did not have transaction in
them for given period. Again i did not lay out the table nor the old
code which was terrible and did not work correctly. I tried several
times to fix the summary table but to many things allowed it to get
out of sync. Keeping the Ending and Beginning Balance correct was to
much trouble and i needed to get numbers we can trust to the accountant.

The developers of the code got credits and debits backwards so instead
of fixing the code they just added code to flip the values on the front
end. Its really annoying. At this point if i could go back 7 months
ago i would not purchased this software if i had known what i know now.

I've had to make all kinds of changes i never intended to make in order
to get the stuff to balance and agree. I've spent the last 3 months in
code review fixing things that allow accounts to get out of balance and
stop stupid things from happening, like posting GL Transactions into
non-existing accounting periods. the list of things i have to fix is
getting dam long.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Justin 2008-05-06 17:23:00 Re: What constitutes a complex query
Previous Message Richard Broersma 2008-05-06 16:58:39 Re: What constitutes a complex query