Link to home
Start Free TrialLog in
Avatar of Leslie7
Leslie7

asked on

IB6 query: aborting / registering for callback

Hi,

I checked the Interbase documentation, yet I have not found anything about aborting a query. Can it be aborted at all? Is there a way to register for a callback to provide some feedback to the user when executing a query?

Regards,
Leslie
Avatar of swift99
swift99

1. I am not aware of any mechanism that allows a query to be aborted.  I work more with DB2 than Interbase, so my knowledge on this should not be taken as definitive.

2. There is a set of interbase monitoring components in Delphi 6 and up.  These should provide the functionality you are looking for, or their source code in the VCL source should allow you to develop the programming techniques for your callbacks.

Avatar of Leslie7

ASKER

Hi  swift99,

It is strange that even DB2 does not allow aborting a query. It seems so simple to add such functionality. :(

I need some time to check if interbase monitoring components can really help me.
Adding that functionality could have significant performance implications, since an SQL engine will be, by necessity, a state engine returning stateless result sets.  I can see generally how it could be done, but making it reliable is not necessarily simple.  

I agree that it would be nice to have an abort sometimes.
Avatar of Leslie7

ASKER

I guessed it might not as easy as it "seems". :)  

If the possibility of abortion would only be an option, the programmer could decide what is more important in every case.

I suppose the actual performance decrease depends on how often (on which “levels”) the engine checks for abortion. This could also be an option to fine tune between speed and reaction time.  

In case many queries (especially time consuming ones) needs to be aborted, the system performance sometimes can even increase, since the engine does not have to spend time on finishing useless queries and delay useful ones.  (I have such situation.)

Do you know any SQL engine at all which allows query abortion?


ASKER CERTIFIED SOLUTION
Avatar of swift99
swift99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Leslie7

ASKER

…taking part in Firebird development ,  well … I don’t think I’m qualified for that at the moment. It would take “some”  :)  time to learn the inside details of  Firebird too. Though it would be nice to use an SQL engine which source code is avaible. It can be debugged …

 I have optimized everything I could, query abortion is probably the only thing left. Queries cannot be taken apart any more. Actually my conclusion was the same as your 2nd suggestion.

Thanks for your help.
 
What are your indexes like?
Avatar of Leslie7

ASKER

I always pay attention on building the proper indexes. There is no more speed to gain there. :)