Re: [despammed] [SQL] Balance Calculation

2005-05-22 Thread LAMBEAU Bernard
Do you tried to create an index on the account column ? I think it may help. Regards - Bernard LAMBEAU Département d'Ingénierie Informatique Université Catholique de Louvain-La-Neuve (Belgium) On 5/22/05, Andrea

Re: [despammed] [SQL] Balance Calculation

2005-05-22 Thread Andreas Kretschmer
am 22.05.2005, um 10:17:53 +0200 mailte Andreas Kretschmer folgendes: > > can you help me how to fix them. > > Can I using function to fix them (how?) > > It is possible to create a extra table for the balance and a trigger for > insert/update that calculates the balance for the transactions-tabl

Re: [despammed] [SQL] Balance Calculation

2005-05-22 Thread Andreas Kretschmer
am 22.05.2005, um 12:15:56 +0800 mailte Muhyiddin A.M Hayat folgendes: Nice SQL ;-) > > everything is ok, but when record > 100 that query eat all my cpu > process and take a long time, i have wait for 3 mimutes but query I think, because for every record in your result is a full table sc

[SQL] Balance Calculation

2005-05-21 Thread Muhyiddin A.M Hayat
Dear All,I have problem to calculation balance from debet and credit.my transaction table:    id |    trx_timestamptz | account  | trx_type_id |   amount++--+-+-  3 | 2005-04-14 17:16:49+08 | 01.2010100.2