Re: [firebird-support] Speed of comparing one field to another

2016-11-28 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Yes, you can, using an expression index CREATE INDEX IDX_MYINDEX ON MY_TABLE COMPUTED BY (INVOICED - RECEIVED); and your SELECT would be: SELECT * FROM MY_TABLE WHERE INVOICED - RECEIVED < 0 That way you will not need to create an additional column neither to do an UPDATE neither to

RE: [firebird-support] Speed of comparing one field to another

2016-10-05 Thread Maya Opperman m...@omniaccounts.co.za [firebird-support]
>Loius Wrote: >You could create a denormalized field that contains the difference of those >values (updated by a trigger, perhaps), and you can put >an index on that new field. Then change the query to find rows where [new >difference field] < 0. >Make sense? Thank you, looks like I will

Re: [firebird-support] Speed of comparing one field to another

2016-09-13 Thread Louis Kleiman lklei...@sstms.com [firebird-support]
You could create a denormalized field that contains the difference of those values (updated by a trigger, perhaps), and you can put an index on that new field. Then change the query to find rows where [new difference field] < 0. Make sense? On Tue, Sep 13, 2016 at 9:37 AM Dimitry Sibiryakov

Re: [firebird-support] Speed of comparing one field to another

2016-09-13 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
13.09.2016 15:26, Maya Opperman m...@omniaccounts.co.za [firebird-support] wrote: > Is there an index I could create to speed up the loading? No. -- WBR, SD.