Re: [sqlite] Performance issue on view

2010-06-02 Thread Israel Lins Albuquerque
An Correction! /***/ DROP TRIGGER IF EXISTS movement_trg02; CREATE TRIGGER movement_trg02 AFTER INSERT ON movement FOR EACH ROW BEGIN REPLACE INTO movement SELECT t1.id , t1.account_id , t1.payment , t1.amount , (COA

Re: [sqlite] Performance issue on view

2010-06-02 Thread Israel Lins Albuquerque
ot;General Discussion of SQLite Database" Enviadas: Terça-feira, 1 de Junho de 2010 17:12:02 Assunto: Re: [sqlite] Performance issue on view Create a new table to do this and add a trigger on op to make the sum. - Mensagem original - De: "Stéphane MANKOWSKI" Para:

Re: [sqlite] Performance issue on view

2010-06-01 Thread Israel Lins Albuquerque
Create a new table to do this and add a trigger on op to make the sum. - Mensagem original - De: "Stéphane MANKOWSKI" Para: sqlite-users@sqlite.org Enviadas: Terça-feira, 1 de Junho de 2010 16:57:16 Assunto: [sqlite] Performance issue on view Hi, In the this database

Re: [sqlite] Performance issue on view

2010-06-01 Thread Pavel Ivanov
> PS: I don't want to compute "balance" attribute by code and save it in op > balance due to the fact that I am using an undo/redo mechanism. >From my experience this is the only way to go - calculate the balance in your application then store it in database along with transaction as "balance afte

[sqlite] Performance issue on view

2010-06-01 Thread Stéphane MANKOWSKI
Hi, In the this database file (http://skrooge.org/files/test.wrk), I created a table named "op" containing banking transactions. A transaction has: An unique id An account A date An amount I created a view named "v_op" with one more computed attribute named "ba