Subject Re: [firebird-support] Speed of comparing one field to another
Author Louis Kleiman
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 sd@... [firebird-support] <firebird-support@yahoogroups.com> wrote:
13.09.2016 15:26, Maya Opperman maya@... [firebird-support] wrote:
> Is there an index I could create to speed up the loading?

   No.


--
   WBR, SD.


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    firebird-support-digest@yahoogroups.com
    firebird-support-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    firebird-support-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/