[firebird-support] Why is SQL slow?

2015-07-02 Thread OB1 oldbasf...@googlemail.com [firebird-support]
Hello Could someone give me some pointers to improve the speed of this SQL please. It's taking about 10 minutes to execute on a fast PC using Firebird v1.56. I am counting the number of messages sent by different methods, for a particular company. A company has a number of contacts and they re

Re: [firebird-support] Why is SQL slow?

2015-07-02 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>Could someone give me some pointers to improve the speed of this SQL please. >It's taking >about 10 minutes to execute on a fast PC using Firebird v1.56. > >I am counting the number of messages sent by different methods, for a >particular company. >A company has a number of contacts and they r

Re: [firebird-support] Why is SQL slow?

2015-07-06 Thread OB1 oldbasf...@googlemail.com [firebird-support]
Hello Svein Thanks for your reply. That made a big difference, down from 10 minutes to 0.5 seconds :-) c.Contact_ID is the PK for the contacts table, so I assume that's automatically indexed. c.Company_ID also has an index. Many thanks David On Thu, Jul 2, 2015 at 9:57 PM, Svein Erling T